rust/src/test/ui/consts/const-blocks/nll-fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
912 B
Plaintext
Raw Normal View History

error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
2021-01-26 16:49:30 -06:00
--> $DIR/nll-fail.rs:12:37
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
|
= help: the trait `Copy` is implemented for `Option<T>`
= note: the `Copy` trait is required because the repeated element will be copied
error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
2021-01-26 16:49:30 -06:00
--> $DIR/nll-fail.rs:18:37
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
|
= help: the trait `Copy` is implemented for `Option<T>`
= note: the `Copy` trait is required because the repeated element will be copied
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.