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

27 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-01-24 07:14:58 -06: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-24 17:59:34 -06:00
LL | let mref = &mut u.s.a;
2018-01-24 07:14:58 -06:00
| ---------- mutable borrow occurs here
...
2018-02-24 17:59:34 -06:00
LL | let nref = &u.z.c;
2018-01-24 07:14:58 -06: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 07:14:58 -06:00
error[E0502]: cannot borrow `u.s.a` as mutable because it is also borrowed as immutable
--> $DIR/issue-45157.rs:39:27
|
2018-02-24 17:59:34 -06:00
LL | let nref = &u.z.c;
2018-01-24 07:14:58 -06:00
| ------ immutable borrow occurs here
2018-02-24 17:59:34 -06:00
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
| |
| mutable borrow occurs here
2018-01-24 07:14:58 -06:00
error: aborting due to 2 previous errors
2018-02-26 02:56:00 -06:00
If you want more information on this error, try using "rustc --explain E0502"