rust/src/test/ui/issues/issue-45157.stderr

16 lines
635 B
Plaintext
Raw Normal View History

2018-01-24 13:14:58 +00:00
error[E0502]: cannot borrow `u.z.c` as immutable because it is also borrowed as mutable
--> $DIR/issue-45157.rs:37:20
|
2018-02-25 02:59:34 +03:00
LL | let mref = &mut u.s.a;
2018-01-24 13:14:58 +00:00
| ---------- mutable borrow occurs here
...
2018-02-25 02:59:34 +03:00
LL | let nref = &u.z.c;
2018-01-24 13:14:58 +00:00
| ^^^^^^ immutable borrow occurs here
LL | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502]
LL | println!("{} {}", mref, nref)
| ---- borrow later used here
2018-01-24 13:14:58 +00:00
error: aborting due to previous error
2018-01-24 13:14:58 +00:00
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0502`.