]>
Commit | Line | Data |
---|---|---|
416331ca | 1 | // ignore-compare-mode-nll |
416331ca XL |
2 | #![allow(warnings)] |
3 | ||
4 | // Some type that is not copyable. | |
5 | struct Bar; | |
6 | ||
7 | mod non_constants { | |
8 | use Bar; | |
9 | ||
10 | fn no_impl_copy_empty_value_multiple_elements() { | |
11 | let x = None; | |
12 | let arr: [Option<Bar>; 2] = [x; 2]; | |
04454e1e | 13 | //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] |
416331ca XL |
14 | } |
15 | ||
16 | fn no_impl_copy_value_multiple_elements() { | |
17 | let x = Some(Bar); | |
18 | let arr: [Option<Bar>; 2] = [x; 2]; | |
04454e1e | 19 | //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] |
416331ca XL |
20 | } |
21 | } | |
22 | ||
23 | fn main() {} |