]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-61623.stderr
901c75981768e63481afacd505435e4f9890c2fd
[rust.git] / src / test / ui / issues / issue-61623.stderr
1 error[E0596]: cannot borrow `*x.1` as mutable, as it is behind a `&` reference
2   --> $DIR/issue-61623.rs:6:19
3    |
4 LL | fn f3<'a>(x: &'a ((), &'a mut ())) {
5    |              -------------------- help: consider changing this to be a mutable reference: `&'a mut ((), &'a mut ())`
6 LL |     f2(|| x.0, f1(x.1))
7    |                   ^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
8
9 error[E0502]: cannot borrow `*x.1` as mutable because it is also borrowed as immutable
10   --> $DIR/issue-61623.rs:6:19
11    |
12 LL |     f2(|| x.0, f1(x.1))
13    |     -- -- ---     ^^^ mutable borrow occurs here
14    |     |  |  |
15    |     |  |  first borrow occurs due to use of `x` in closure
16    |     |  immutable borrow occurs here
17    |     immutable borrow later used by call
18
19 error: aborting due to 2 previous errors
20
21 Some errors have detailed explanations: E0502, E0596.
22 For more information about an error, try `rustc --explain E0502`.