1 error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable
2 --> $DIR/issue-105761-suggest-self-for-closure.rs:11:9
4 LL | let x = |v: i32| {
5 | -------- immutable borrow occurs here
7 | ---- first borrow occurs due to use of `self` in closure
10 | ^^^^^^^^^^ mutable borrow occurs here
12 | - immutable borrow later used here
14 help: try explicitly pass `&Self` into the Closure as an argument
16 LL ~ let x = |this: &Self, v: i32| {
25 error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable
26 --> $DIR/issue-105761-suggest-self-for-closure.rs:23:9
29 | -- immutable borrow occurs here
31 | ---- first borrow occurs due to use of `self` in closure
34 | ^^^^^^^^^^ mutable borrow occurs here
36 | - immutable borrow later used here
38 help: try explicitly pass `&Self` into the Closure as an argument
40 LL ~ let y = |this: &Self| {
47 error: aborting due to 2 previous errors
49 For more information about this error, try `rustc --explain E0502`.