fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0502]: cannot borrow `self.thing` as mutable because it is also borrowed as immutable 2 --> $DIR/issue-51268.rs:16:9 3 | 4LL | self.thing.bar(|| { 5 | ^ --- -- immutable borrow occurs here 6 | | | 7 | _________| immutable borrow later used by call 8 | | 9LL | | 10LL | | &self.number; 11 | | ---- first borrow occurs due to use of `self` in closure 12LL | | }); 13 | |__________^ mutable borrow occurs here 14 15error: aborting due to previous error 16 17For more information about this error, try `rustc --explain E0502`.