2021-01-29 11:54:19 +05:30
|
|
|
error[E0277]: the trait bound `String: Copy` is not satisfied
|
2023-07-21 15:59:28 +00:00
|
|
|
--> $DIR/const-fn-in-vec.rs:1:47
|
2021-01-29 11:54:19 +05:30
|
|
|
|
|
2023-07-21 15:59:28 +00:00
|
|
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5];
|
2024-06-24 15:30:24 +03:00
|
|
|
| ^^^^
|
|
|
|
| |
|
2024-10-24 21:14:17 +00:00
|
|
|
| the trait `Copy` is not implemented for `String`
|
2024-06-24 15:30:24 +03:00
|
|
|
| help: create an inline `const` block: `const { None }`
|
2021-01-29 11:54:19 +05:30
|
|
|
|
|
2023-07-21 15:59:28 +00:00
|
|
|
= note: required for `Option<String>` to implement `Copy`
|
2022-04-28 09:40:42 +00:00
|
|
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
2023-07-21 15:59:28 +00:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `String: Copy` is not satisfied
|
|
|
|
--> $DIR/const-fn-in-vec.rs:7:34
|
|
|
|
|
|
|
|
|
LL | let _strings: [String; 5] = [String::new(); 5];
|
2024-06-24 15:30:24 +03:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| the trait `Copy` is not implemented for `String`
|
|
|
|
| help: create an inline `const` block: `const { String::new() }`
|
2023-07-21 15:59:28 +00:00
|
|
|
|
|
|
|
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `String: Copy` is not satisfied
|
|
|
|
--> $DIR/const-fn-in-vec.rs:9:48
|
|
|
|
|
|
|
|
|
LL | let _maybe_strings: [Option<String>; 5] = [None; 5];
|
2024-06-24 15:30:24 +03:00
|
|
|
| ^^^^
|
|
|
|
| |
|
2024-10-24 21:14:17 +00:00
|
|
|
| the trait `Copy` is not implemented for `String`
|
2024-06-24 15:30:24 +03:00
|
|
|
| help: create an inline `const` block: `const { None }`
|
2023-07-21 15:59:28 +00:00
|
|
|
|
|
|
|
|
= note: required for `Option<String>` to implement `Copy`
|
|
|
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
2021-01-29 11:54:19 +05:30
|
|
|
|
2023-07-21 15:59:28 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2021-01-29 11:54:19 +05:30
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|