]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-lend-flow-match.mir.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / borrowck / borrowck-lend-flow-match.mir.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2   --> $DIR/borrowck-lend-flow-match.rs:18:13
3    |
4 LL |         Some(ref r) => {
5    |              ----- borrow of `x` occurs here
6 LL |             x = Some(1); //[ast]~ ERROR cannot assign
7    |             ^^^^^^^^^^^ assignment to borrowed `x` occurs here
8 LL |             //[mir]~^ ERROR cannot assign to `x` because it is borrowed
9 LL |             drop(r);
10    |                  - borrow later used here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0506`.