]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/move-in-pattern-mut-in-loop.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / move-in-pattern-mut-in-loop.stderr
1 error[E0382]: use of moved value
2   --> $DIR/move-in-pattern-mut-in-loop.rs:7:21
3    |
4 LL |         if let Some(mut _x) = opt {}
5    |                     ^^^^^^ value moved here, in previous iteration of loop
6    |
7    = note: move occurs because value has type `&mut i32`, which does not implement the `Copy` trait
8 help: borrow this binding in the pattern to avoid moving the value
9    |
10 LL |         if let Some(ref mut _x) = opt {}
11    |                     +++
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0382`.