-error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
- --> $DIR/nll-fail.rs:12:37
+error[E0277]: the trait bound `Bar: Copy` is not satisfied
+ --> $DIR/nll-fail.rs:11:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
- | ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
+ | ^ the trait `Copy` is not implemented for `Bar`
+ |
+ = note: required for `Option<Bar>` to implement `Copy`
+ = note: the `Copy` trait is required because this value will be copied for each element of the array
+help: consider annotating `Bar` with `#[derive(Copy)]`
+ |
+LL | #[derive(Copy)]
|
- = help: the following implementations were found:
- <Option<T> as Copy>
- = note: the `Copy` trait is required because the repeated element will be copied
-error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
- --> $DIR/nll-fail.rs:18:37
+error[E0277]: the trait bound `Bar: Copy` is not satisfied
+ --> $DIR/nll-fail.rs:17:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
- | ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
+ | ^ the trait `Copy` is not implemented for `Bar`
+ |
+ = note: required for `Option<Bar>` to implement `Copy`
+ = note: the `Copy` trait is required because this value will be copied for each element of the array
+help: consider annotating `Bar` with `#[derive(Copy)]`
+ |
+LL | #[derive(Copy)]
|
- = help: the following implementations were found:
- <Option<T> as Copy>
- = note: the `Copy` trait is required because the repeated element will be copied
error: aborting due to 2 previous errors