]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-27282-move-ref-mut-into-guard.stderr
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-27282-move-ref-mut-into-guard.stderr
index 7895cefb4cb2ed9eb4396f173f4b56f2646ef1b8..a0d32616f83b74f2dad691636171476b1d40cc59 100644 (file)
@@ -2,10 +2,8 @@ error[E0507]: cannot move out of `foo` in pattern guard
   --> $DIR/issue-27282-move-ref-mut-into-guard.rs:9:19
    |
 LL |             if { (|| { let bar = foo; bar.take() })(); false } => {},
-   |                   ^^             ---
-   |                   |              |
-   |                   |              move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
-   |                   |              move occurs due to use in closure
+   |                   ^^             --- move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait
+   |                   |
    |                   move out of `foo` occurs here
    |
    = note: variables bound in patterns cannot be moved from until after the end of the pattern guard