rust/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
694 B
Plaintext
Raw Normal View History

error[E0277]: the trait bound `Foo: Copy` is not satisfied
--> $DIR/repeat-to-run-dtor-twice.rs:17:15
2018-08-08 12:28:26 +00:00
|
LL | let _ = [ a; 5 ];
| ^ the trait `Copy` is not implemented for `Foo`
2018-08-08 12:28:26 +00:00
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
= 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
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`.