From 26776858cfaf2a46643ea0655fc0a2f4bf362df9 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 31 Jul 2018 14:36:50 +0200 Subject: [PATCH] Update tests that use `-Z borrowck=compare` or `#[feature(nll)]` to accmmodate diagnostic change. --- src/test/ui/borrowck/issue-41962.stderr | 38 +++++++++---------- .../ui/borrowck/two-phase-multi-mut.stderr | 20 +++++----- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 4048243acfa..b6e005a6673 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -16,6 +16,25 @@ LL | if let Some(thing) = maybe { | = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait +error[E0382]: use of moved value: `maybe` (Mir) + --> $DIR/issue-41962.rs:17:16 + | +LL | if let Some(thing) = maybe { + | ^^^^^-----^ + | | | + | | value moved here + | value used here after move + | + = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + +error[E0382]: use of moved value (Mir) + --> $DIR/issue-41962.rs:17:21 + | +LL | if let Some(thing) = maybe { + | ^^^^^ value moved here in previous iteration of loop + | + = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + error[E0382]: use of moved value: `maybe` (Mir) --> $DIR/issue-41962.rs:17:30 | @@ -36,25 +55,6 @@ LL | if let Some(thing) = maybe { | = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait -error[E0382]: use of moved value: `maybe` (Mir) - --> $DIR/issue-41962.rs:17:16 - | -LL | if let Some(thing) = maybe { - | ^^^^^-----^ - | | | - | | value moved here - | value used here after move - | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait - -error[E0382]: use of moved value (Mir) - --> $DIR/issue-41962.rs:17:21 - | -LL | if let Some(thing) = maybe { - | ^^^^^ value moved here in previous iteration of loop - | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait - error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0382`. diff --git a/src/test/ui/borrowck/two-phase-multi-mut.stderr b/src/test/ui/borrowck/two-phase-multi-mut.stderr index 0c02acf6548..a7e1dd95364 100644 --- a/src/test/ui/borrowck/two-phase-multi-mut.stderr +++ b/src/test/ui/borrowck/two-phase-multi-mut.stderr @@ -1,13 +1,3 @@ -error[E0499]: cannot borrow `foo` as mutable more than once at a time - --> $DIR/two-phase-multi-mut.rs:23:16 - | -LL | foo.method(&mut foo); - | -----------^^^^^^^^- - | | | - | | second mutable borrow occurs here - | first mutable borrow occurs here - | borrow later used here - error[E0499]: cannot borrow `foo` as mutable more than once at a time --> $DIR/two-phase-multi-mut.rs:23:5 | @@ -18,6 +8,16 @@ LL | foo.method(&mut foo); | second mutable borrow occurs here | borrow later used here +error[E0499]: cannot borrow `foo` as mutable more than once at a time + --> $DIR/two-phase-multi-mut.rs:23:16 + | +LL | foo.method(&mut foo); + | -----------^^^^^^^^- + | | | + | | second mutable borrow occurs here + | first mutable borrow occurs here + | borrow later used here + error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0499`.