Suggest derivable trait on E0277
This commit is contained in:
parent
60e50fc1cf
commit
0d2a00058b
62 changed files with 310 additions and 0 deletions
|
|
@ -5,6 +5,10 @@ LL | let headers = [Header{value: &[]}; 128];
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>`
|
||||
|
|
||||
= note: the `Copy` trait is required because the repeated element will be copied
|
||||
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
|
||||
|
|
||||
LL | #[derive(Copy)]
|
||||
|
|
||||
|
||||
error[E0277]: the trait bound `Header<'_>: Copy` is not satisfied
|
||||
--> $DIR/repeat_empty_ok.rs:13:19
|
||||
|
|
@ -13,6 +17,10 @@ LL | let headers = [Header{value: &[0]}; 128];
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Header<'_>`
|
||||
|
|
||||
= note: the `Copy` trait is required because the repeated element will be copied
|
||||
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
|
||||
|
|
||||
LL | #[derive(Copy)]
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue