]>
Commit | Line | Data |
---|---|---|
416331ca | 1 | error[E0277]: the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied |
e74abb32 | 2 | --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:8:36 |
416331ca XL |
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 | |
e74abb32 | 10 | = note: this array initializer can be evaluated at compile-time, for more information, see issue https://github.com/rust-lang/rust/issues/49147 |
60c5eb7d | 11 | = help: add `#![feature(const_in_array_repeat_expressions)]` to the crate attributes to enable |
416331ca | 12 | |
e74abb32 XL |
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 | |
416331ca XL |
24 | |
25 | For more information about this error, try `rustc --explain E0277`. |