about summary refs log tree commit diff
path: root/src/test/ui/array-slice-vec
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-05 15:56:49 +0200
committerGitHub <noreply@github.com>2022-04-05 15:56:49 +0200
commit661b0e5b325429db17501bbe79168dc360cabf37 (patch)
tree568ce36a620240e8ce4aceecd754a5e7e7a76bdd /src/test/ui/array-slice-vec
parent634770c0a7f8598164ab825cfe419cc8b03c36e5 (diff)
parentb831b60cefabafa78ea9da173c2ce9c0321a29c7 (diff)
downloadrust-661b0e5b325429db17501bbe79168dc360cabf37.tar.gz
rust-661b0e5b325429db17501bbe79168dc360cabf37.zip
Rollup merge of #95525 - ohno418:suggest-derivable-trait-E0277, r=compiler-errors
Suggest derivable trait on E0277 error

Closes https://github.com/rust-lang/rust/issues/95099 .
Diffstat (limited to 'src/test/ui/array-slice-vec')
-rw-r--r--src/test/ui/array-slice-vec/repeat_empty_ok.stderr8
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