]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/check-static-values-constraints.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / check-static-values-constraints.stderr
index f35703a306d84d564083d40e3895dd94bb3c56f8..a13c217483d5dea7e2028c1f4bdc91830b192025 100644 (file)
@@ -85,13 +85,13 @@ error[E0019]: static contains unimplemented expression type
 LL |     box 3;
    |         ^
 
-error[E0507]: cannot move out of static item
+error[E0507]: cannot move out of static item `x`
   --> $DIR/check-static-values-constraints.rs:116:45
    |
 LL |     let y = { static x: Box<isize> = box 3; x };
    |                                             ^
    |                                             |
-   |                                             cannot move out of static item
+   |                                             move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
    |                                             help: consider borrowing here: `&x`
 
 error[E0010]: allocations are not allowed in statics