diff options
| author | ohno418 <yutaro.ono.418@gmail.com> | 2022-03-31 23:58:45 +0900 |
|---|---|---|
| committer | ohno418 <yutaro.ono.418@gmail.com> | 2022-04-05 11:14:32 +0900 |
| commit | 0d2a00058b4b3d4a04712309cc4cc371a8fb8653 (patch) | |
| tree | d7679066cc258ef617d33c91f9d8bc72b8ffd288 /src/test/ui/array-slice-vec | |
| parent | 60e50fc1cfe0bb693a5f4f93eb83ef70854531e3 (diff) | |
| download | rust-0d2a00058b4b3d4a04712309cc4cc371a8fb8653.tar.gz rust-0d2a00058b4b3d4a04712309cc4cc371a8fb8653.zip | |
Suggest derivable trait on E0277
Diffstat (limited to 'src/test/ui/array-slice-vec')
| -rw-r--r-- | src/test/ui/array-slice-vec/repeat_empty_ok.stderr | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/array-slice-vec/repeat_empty_ok.stderr b/src/test/ui/array-slice-vec/repeat_empty_ok.stderr index 85baa1268bf..eba1a8e2278 100644 --- a/src/test/ui/array-slice-vec/repeat_empty_ok.stderr +++ b/src/test/ui/array-slice-vec/repeat_empty_ok.stderr @@ -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 |
