about summary refs log tree commit diff
path: root/src/test/ui/generator
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-07-26 13:17:33 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-07-26 14:51:32 +0200
commit4b2e553dac205609277607b3a192cc7fc905fc2c (patch)
tree2357370dec9e27cb3ea6bab89739bc97cfaf96df /src/test/ui/generator
parent1a59dafe1198b9f36d7c72e536f5d57495de1b9d (diff)
downloadrust-4b2e553dac205609277607b3a192cc7fc905fc2c.tar.gz
rust-4b2e553dac205609277607b3a192cc7fc905fc2c.zip
integrate the edition code.
As a driveby change, I made `#![feature(nll)]` *always* take
precedence over `-Z borrowck`.  The main effect this had is that it
means tests with `#![feature(nll)]` will ignore uses of `-Z
borrowck=compare`. This affected only one test as far as I can tell,
and I think that test used `-Z borrowck=compare` only as a historical
accident.
Diffstat (limited to 'src/test/ui/generator')
-rw-r--r--src/test/ui/generator/generator-with-nll.rs8
-rw-r--r--src/test/ui/generator/generator-with-nll.stderr28
2 files changed, 8 insertions, 28 deletions
diff --git a/src/test/ui/generator/generator-with-nll.rs b/src/test/ui/generator/generator-with-nll.rs
index 3223ff4dc8b..fdfe9e2c562 100644
--- a/src/test/ui/generator/generator-with-nll.rs
+++ b/src/test/ui/generator/generator-with-nll.rs
@@ -8,17 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags: -Z borrowck=compare
-
 #![feature(generators)]
 #![feature(nll)]
 
 fn main() {
     || {
         // The reference in `_a` is a Legal with NLL since it ends before the yield
-        let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast)
-        let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast)
-        //~^ borrow may still be in use when generator yields (Mir)
+        let _a = &mut true;
+        let b = &mut true;
+        //~^ borrow may still be in use when generator yields
         yield ();
         println!("{}", b);
     };
diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr
index 7e39d3c5459..1dc663d8bcb 100644
--- a/src/test/ui/generator/generator-with-nll.stderr
+++ b/src/test/ui/generator/generator-with-nll.stderr
@@ -1,30 +1,12 @@
-error[E0626]: borrow may still be in use when generator yields (Ast)
-  --> $DIR/generator-with-nll.rs:19:23
+error[E0626]: borrow may still be in use when generator yields
+  --> $DIR/generator-with-nll.rs:18:17
    |
-LL |         let _a = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast)
-   |                       ^^^^
-...
-LL |         yield ();
-   |         -------- possible yield occurs here
-
-error[E0626]: borrow may still be in use when generator yields (Ast)
-  --> $DIR/generator-with-nll.rs:20:22
-   |
-LL |         let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast)
-   |                      ^^^^
-LL |         //~^ borrow may still be in use when generator yields (Mir)
-LL |         yield ();
-   |         -------- possible yield occurs here
-
-error[E0626]: borrow may still be in use when generator yields (Mir)
-  --> $DIR/generator-with-nll.rs:20:17
-   |
-LL |         let b = &mut true; //~ ERROR borrow may still be in use when generator yields (Ast)
+LL |         let b = &mut true;
    |                 ^^^^^^^^^
-LL |         //~^ borrow may still be in use when generator yields (Mir)
+LL |         //~^ borrow may still be in use when generator yields
 LL |         yield ();
    |         -------- possible yield occurs here
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0626`.