rust/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-borrowck.stderr

19 lines
811 B
Plaintext
Raw Normal View History

error: repeated expression does not implement `std::marker::Copy`
--> $DIR/nll-borrowck.rs:87:37
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option<Bar>`
|
= note: the `std::marker::Copy` trait is required because the repeated element will be copied
error: repeated expression does not implement `std::marker::Copy`
--> $DIR/nll-borrowck.rs:103:37
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option<Bar>`
|
= note: the `std::marker::Copy` trait is required because the repeated element will be copied
error: aborting due to 2 previous errors