]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/const-blocks/nll-fail.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / const-blocks / nll-fail.stderr
index 81220856359778d9070432698e92b1bf5cbef1fb..fede0084547c944354541825680960354eb6e5c2 100644 (file)
@@ -1,22 +1,28 @@
-error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
-  --> $DIR/nll-fail.rs:12:37
+error[E0277]: the trait bound `Bar: Copy` is not satisfied
+  --> $DIR/nll-fail.rs:11:38
    |
 LL |         let arr: [Option<Bar>; 2] = [x; 2];
-   |                                     ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
+   |                                      ^ the trait `Copy` is not implemented for `Bar`
+   |
+   = note: required for `Option<Bar>` to implement `Copy`
+   = note: the `Copy` trait is required because this value will be copied for each element of the array
+help: consider annotating `Bar` with `#[derive(Copy)]`
+   |
+LL | #[derive(Copy)]
    |
-   = help: the following implementations were found:
-             <Option<T> as Copy>
-   = note: the `Copy` trait is required because the repeated element will be copied
 
-error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
-  --> $DIR/nll-fail.rs:18:37
+error[E0277]: the trait bound `Bar: Copy` is not satisfied
+  --> $DIR/nll-fail.rs:17:38
    |
 LL |         let arr: [Option<Bar>; 2] = [x; 2];
-   |                                     ^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
+   |                                      ^ the trait `Copy` is not implemented for `Bar`
+   |
+   = note: required for `Option<Bar>` to implement `Copy`
+   = note: the `Copy` trait is required because this value will be copied for each element of the array
+help: consider annotating `Bar` with `#[derive(Copy)]`
+   |
+LL | #[derive(Copy)]
    |
-   = help: the following implementations were found:
-             <Option<T> as Copy>
-   = note: the `Copy` trait is required because the repeated element will be copied
 
 error: aborting due to 2 previous errors