2022-04-11 16:38:48 +00:00
|
|
|
error[E0277]: the trait bound `String: Copy` is not satisfied
|
|
|
|
--> $DIR/trait-error.rs:5:6
|
2019-06-12 07:46:56 +00:00
|
|
|
|
|
|
|
|
LL | [Foo(String::new()); 4];
|
2024-06-24 12:30:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
2024-10-24 21:14:17 +00:00
|
|
|
| the trait `Copy` is not implemented for `String`
|
2024-06-24 12:30:24 +00:00
|
|
|
| help: create an inline `const` block: `const { Foo(String::new()) }`
|
2019-06-12 07:46:56 +00:00
|
|
|
|
|
2022-08-15 20:31:37 +00:00
|
|
|
note: required for `Foo<String>` to implement `Copy`
|
2022-04-11 16:38:48 +00:00
|
|
|
--> $DIR/trait-error.rs:1:10
|
|
|
|
|
|
|
|
|
LL | #[derive(Copy, Clone)]
|
2023-01-11 03:21:11 +00:00
|
|
|
| ^^^^ unsatisfied trait bound introduced in this `derive` macro
|
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
|
2022-04-11 16:38:48 +00:00
|
|
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-06-12 07:46:56 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2019-06-12 07:46:56 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|