2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the trait bound `Foo: Copy` is not satisfied
|
2022-04-11 16:38:48 +00:00
|
|
|
--> $DIR/repeat-to-run-dtor-twice.rs:17:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [ a; 5 ];
|
2022-04-11 16:38:48 +00:00
|
|
|
| ^ the trait `Copy` is not implemented for `Foo`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
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
|
2024-01-05 02:25:20 +00:00
|
|
|
= help: consider using `core::array::from_fn` to initialize the array
|
2024-01-23 23:08:43 +00:00
|
|
|
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
|
2022-03-31 14:58:45 +00:00
|
|
|
help: consider annotating `Foo` with `#[derive(Copy)]`
|
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + #[derive(Copy)]
|
|
|
|
LL | struct Foo {
|
2022-03-31 14:58:45 +00:00
|
|
|
|
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|