]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-lend-flow-match.stderr
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[rust.git] / src / test / ui / borrowck / borrowck-lend-flow-match.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2   --> $DIR/borrowck-lend-flow-match.rs:12:13
3    |
4 LL |         Some(ref r) => {
5    |              ----- borrow of `x` occurs here
6 LL |             x = Some(1);
7    |             ^^^^^^^^^^^ assignment to borrowed `x` occurs here
8 LL |             drop(r);
9    |                  - borrow later used here
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0506`.