]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/issue-51268.stderr
Update upstream source from tag 'upstream/1.31.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / nll / issue-51268.stderr
1 error[E0502]: cannot borrow `self.thing` as mutable because it is also borrowed as immutable
2 --> $DIR/issue-51268.rs:28:9
3 |
4 LL | self.thing.bar(|| {
5 | ^ --- -- immutable borrow occurs here
6 | | |
7 | _________| immutable borrow later used by call
8 | |
9 LL | | //~^ ERROR cannot borrow `self.thing` as mutable because it is also borrowed as immutable [E0502]
10 LL | | &self.number;
11 | | ---- first borrow occurs due to use of `self` in closure
12 LL | | });
13 | |__________^ mutable borrow occurs here
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0502`.