1 error[E0502]: cannot borrow `self.thing` as mutable because it is also borrowed as immutable
2 --> $DIR/issue-51268.rs:28:9
4 LL | self.thing.bar(|| {
5 | ^ --- -- immutable borrow occurs here
7 | _________| immutable borrow later used by call
9 LL | | //~^ ERROR cannot borrow `self.thing` as mutable because it is also borrowed as immutable [E0502]
11 | | ---- first borrow occurs due to use of `self` in closure
13 | |__________^ mutable borrow occurs here
15 error: aborting due to previous error
17 For more information about this error, try `rustc --explain E0502`.