]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.stderr
make mem-categorization use adjusted type for patterns
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / borrowck-issue-49631.stderr
1 error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable
2   --> $DIR/borrowck-issue-49631.rs:30:9
3    |
4 LL |     while let Some(Ok(string)) = foo.get() {
5    |                                  ---     - immutable borrow ends here
6    |                                  |
7    |                                  immutable borrow occurs here
8 LL |         foo.mutate();
9    |         ^^^ mutable borrow occurs here
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0502`.