Fix tests after two-phase borrow rewrite

This commit is contained in:
bobtwinkles 2018-03-06 03:37:21 -05:00
parent e4e377f6e8
commit 03f198fcee
5 changed files with 14 additions and 33 deletions

View file

@ -12,7 +12,7 @@
// in the type of `p` includes the points after `&v[0]` up to (but not
// including) the call to `use_x`. The `else` branch is not included.
// compile-flags:-Zborrowck=compare -Znll
// compile-flags:-Zborrowck=compare -Znll -Ztwo-phase-borrows
#![allow(warnings)]
#![feature(rustc_attrs)]

View file

@ -37,7 +37,6 @@ fn main() {
let nref = &u.z.c;
//~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502]
println!("{} {}", mref, nref)
//~^ ERROR cannot borrow `u.s.a` as mutable because it is also borrowed as immutable [E0502]
}
}

View file

@ -10,17 +10,6 @@ LL | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also bo
LL | println!("{} {}", mref, nref)
| ---- borrow later used here
error[E0502]: cannot borrow `u.s.a` as mutable because it is also borrowed as immutable
--> $DIR/issue-45157.rs:39:27
|
LL | let nref = &u.z.c;
| ------ 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
| |
| mutable borrow occurs here
error: aborting due to 2 previous errors
error: aborting due to previous error
If you want more information on this error, try using "rustc --explain E0502"