You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds a suggestion to add the
`#![feature(const_in_array_repeat_expression)]` attribute to the crate
when a promotable expression is used in a repeat expression.
Signed-off-by: David Wood <[email protected]>
LL | let arr: [Option<String>; 2] = [None::<String>; 2];
5
5
| ^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option<std::string::String>`
6
6
|
7
7
= help: the following implementations were found:
8
8
<std::option::Option<T> as std::marker::Copy>
9
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_expression)]` to the crate attributes to enable
10
12
11
-
error: aborting due to previous error
13
+
error[E0277]: the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied
0 commit comments