]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / borrowck / borrowck-closures-mut-of-imm.nll.stderr
1 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
2   --> $DIR/borrowck-closures-mut-of-imm.rs:23:21
3    |
4 LL |     let c1 = || set(&mut *x);
5    |                     ^^^^^^^ cannot borrow as mutable
6
7 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
8   --> $DIR/borrowck-closures-mut-of-imm.rs:25:21
9    |
10 LL |     let c2 = || set(&mut *x);
11    |                     ^^^^^^^ cannot borrow as mutable
12
13 error: aborting due to 2 previous errors
14
15 For more information about this error, try `rustc --explain E0596`.