]> git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-const_in_array_repeat_expressions.stderr
1 error[E0277]: the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied
2 --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:8:36
3 |
4 LL | let arr: [Option<String>; 2] = [None::<String>; 2];
5 | ^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option<std::string::String>`
6 |
7 = help: the following implementations were found:
8 <std::option::Option<T> as std::marker::Copy>
9 = note: the `Copy` trait is required because the repeated element will be copied
10 = note: this array initializer can be evaluated at compile-time, for more information, see issue https://github.com/rust-lang/rust/issues/49147
11 = help: add `#![feature(const_in_array_repeat_expressions)]` to the crate attributes to enable
12
13 error[E0277]: the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied
14 --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:14:36
15 |
16 LL | let arr: [Option<String>; 2] = [Some("foo".to_string()); 2];
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option<std::string::String>`
18 |
19 = help: the following implementations were found:
20 <std::option::Option<T> as std::marker::Copy>
21 = note: the `Copy` trait is required because the repeated element will be copied
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0277`.