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