summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-11 23:18:35 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-11 23:18:35 +0300
commitc1cfacfb13f2bdf6bd94e81164c90b2449ec60a1 (patch)
treebcea2c225e57ee199985f3128dacb9b25cf1a766 /src/test/ui/error-codes
parentfa72a81bea27f1fda4287475e4cc2f684c971e7f (diff)
downloadrust-c1cfacfb13f2bdf6bd94e81164c90b2449ec60a1.tar.gz
rust-c1cfacfb13f2bdf6bd94e81164c90b2449ec60a1.zip
Update NLL tests
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0017.nll.stderr10
-rw-r--r--src/test/ui/error-codes/E0301.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0388.nll.stderr10
-rw-r--r--src/test/ui/error-codes/E0389.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0499.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0502.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0503.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0504.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0505.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0509.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0597.nll.stderr2
11 files changed, 19 insertions, 19 deletions
diff --git a/src/test/ui/error-codes/E0017.nll.stderr b/src/test/ui/error-codes/E0017.nll.stderr
index 0477f06010b..3c2a07265f4 100644
--- a/src/test/ui/error-codes/E0017.nll.stderr
+++ b/src/test/ui/error-codes/E0017.nll.stderr
@@ -1,31 +1,31 @@
 error[E0017]: references in constants may only refer to immutable values
   --> $DIR/E0017.rs:4:30
    |
-LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+LL | const CR: &'static mut i32 = &mut C;
    |                              ^^^^^^ constants require immutable values
 
 error[E0017]: references in statics may only refer to immutable values
   --> $DIR/E0017.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^ statics require immutable values
 
 error: cannot mutate statics in the initializer of another static
   --> $DIR/E0017.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^
 
 error[E0596]: cannot borrow immutable static item `X` as mutable
   --> $DIR/E0017.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^ cannot borrow as mutable
 
 error[E0017]: references in statics may only refer to immutable values
   --> $DIR/E0017.rs:8:38
    |
-LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+LL | static CONST_REF: &'static mut i32 = &mut C;
    |                                      ^^^^^^ statics require immutable values
 
 error: aborting due to 5 previous errors
diff --git a/src/test/ui/error-codes/E0301.nll.stderr b/src/test/ui/error-codes/E0301.nll.stderr
index 898c30a75b2..24234c9929e 100644
--- a/src/test/ui/error-codes/E0301.nll.stderr
+++ b/src/test/ui/error-codes/E0301.nll.stderr
@@ -1,7 +1,7 @@
 error[E0301]: cannot mutably borrow in a pattern guard
   --> $DIR/E0301.rs:4:19
    |
-LL |         option if option.take().is_none() => {}, //~ ERROR E0301
+LL |         option if option.take().is_none() => {},
    |                   ^^^^^^ borrowed mutably in pattern guard
    |
    = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
diff --git a/src/test/ui/error-codes/E0388.nll.stderr b/src/test/ui/error-codes/E0388.nll.stderr
index a898d60a985..0fc8a76820c 100644
--- a/src/test/ui/error-codes/E0388.nll.stderr
+++ b/src/test/ui/error-codes/E0388.nll.stderr
@@ -1,31 +1,31 @@
 error[E0017]: references in constants may only refer to immutable values
   --> $DIR/E0388.rs:4:30
    |
-LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
+LL | const CR: &'static mut i32 = &mut C;
    |                              ^^^^^^ constants require immutable values
 
 error[E0017]: references in statics may only refer to immutable values
   --> $DIR/E0388.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^ statics require immutable values
 
 error: cannot mutate statics in the initializer of another static
   --> $DIR/E0388.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^
 
 error[E0596]: cannot borrow immutable static item `X` as mutable
   --> $DIR/E0388.rs:5:39
    |
-LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
+LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^ cannot borrow as mutable
 
 error[E0017]: references in statics may only refer to immutable values
   --> $DIR/E0388.rs:8:38
    |
-LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
+LL | static CONST_REF: &'static mut i32 = &mut C;
    |                                      ^^^^^^ statics require immutable values
 
 error: aborting due to 5 previous errors
diff --git a/src/test/ui/error-codes/E0389.nll.stderr b/src/test/ui/error-codes/E0389.nll.stderr
index 13d2f8cfaa5..c47750b6f4e 100644
--- a/src/test/ui/error-codes/E0389.nll.stderr
+++ b/src/test/ui/error-codes/E0389.nll.stderr
@@ -3,7 +3,7 @@ error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference
    |
 LL |     let fancy_ref = &(&mut fancy);
    |                     ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)`
-LL |     fancy_ref.num = 6; //~ ERROR E0389
+LL |     fancy_ref.num = 6;
    |     ^^^^^^^^^^^^^^^^^ `fancy_ref` is a `&` reference, so the data it refers to cannot be written
 
 error: aborting due to previous error
diff --git a/src/test/ui/error-codes/E0499.nll.stderr b/src/test/ui/error-codes/E0499.nll.stderr
index c1acef10e6e..d56baf72272 100644
--- a/src/test/ui/error-codes/E0499.nll.stderr
+++ b/src/test/ui/error-codes/E0499.nll.stderr
@@ -3,7 +3,7 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time
    |
 LL |     let mut x = &mut i;
    |                 ------ first mutable borrow occurs here
-LL |     let mut a = &mut i; //~ ERROR E0499
+LL |     let mut a = &mut i;
    |                 ^^^^^^ second mutable borrow occurs here
 LL |     a.use_mut();
 LL |     x.use_mut();
diff --git a/src/test/ui/error-codes/E0502.nll.stderr b/src/test/ui/error-codes/E0502.nll.stderr
index 64ca8f0e6b9..cade6d71852 100644
--- a/src/test/ui/error-codes/E0502.nll.stderr
+++ b/src/test/ui/error-codes/E0502.nll.stderr
@@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immut
    |
 LL |     let ref y = a;
    |         ----- immutable borrow occurs here
-LL |     bar(a); //~ ERROR E0502
+LL |     bar(a);
    |     ^^^^^^ mutable borrow occurs here
 LL |     y.use_ref();
    |     - immutable borrow later used here
diff --git a/src/test/ui/error-codes/E0503.nll.stderr b/src/test/ui/error-codes/E0503.nll.stderr
index 7b483a5eaa5..106dda2bc22 100644
--- a/src/test/ui/error-codes/E0503.nll.stderr
+++ b/src/test/ui/error-codes/E0503.nll.stderr
@@ -3,7 +3,7 @@ error[E0503]: cannot use `value` because it was mutably borrowed
    |
 LL |     let _borrow = &mut value;
    |                   ---------- borrow of `value` occurs here
-LL |     let _sum = value + 1; //~ ERROR E0503
+LL |     let _sum = value + 1;
    |                ^^^^^ use of borrowed `value`
 LL |     _borrow.use_mut();
    |     ------- borrow later used here
diff --git a/src/test/ui/error-codes/E0504.nll.stderr b/src/test/ui/error-codes/E0504.nll.stderr
index 8d7387e86e5..1f2a0407a39 100644
--- a/src/test/ui/error-codes/E0504.nll.stderr
+++ b/src/test/ui/error-codes/E0504.nll.stderr
@@ -6,7 +6,7 @@ LL |     let fancy_ref = &fancy_num;
 LL | 
 LL |     let x = move || {
    |             ^^^^^^^ move out of `fancy_num` occurs here
-LL |         println!("child function: {}", fancy_num.num); //~ ERROR E0504
+LL |         println!("child function: {}", fancy_num.num);
    |                                        --------- move occurs due to use in closure
 ...
 LL |     println!("main function: {}", fancy_ref.num);
diff --git a/src/test/ui/error-codes/E0505.nll.stderr b/src/test/ui/error-codes/E0505.nll.stderr
index 181e5e33d29..4d9d1ef121c 100644
--- a/src/test/ui/error-codes/E0505.nll.stderr
+++ b/src/test/ui/error-codes/E0505.nll.stderr
@@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed
    |
 LL |         let _ref_to_val: &Value = &x;
    |                                   -- borrow of `x` occurs here
-LL |         eat(x); //~ ERROR E0505
+LL |         eat(x);
    |             ^ move out of `x` occurs here
 LL |         _ref_to_val.use_ref();
    |         ----------- borrow later used here
diff --git a/src/test/ui/error-codes/E0509.nll.stderr b/src/test/ui/error-codes/E0509.nll.stderr
index 0233c7d6d16..e5c0cf6e24e 100644
--- a/src/test/ui/error-codes/E0509.nll.stderr
+++ b/src/test/ui/error-codes/E0509.nll.stderr
@@ -1,7 +1,7 @@
 error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait
   --> $DIR/E0509.rs:16:23
    |
-LL |     let fancy_field = drop_struct.fancy; //~ ERROR E0509
+LL |     let fancy_field = drop_struct.fancy;
    |                       ^^^^^^^^^^^^^^^^^
    |                       |
    |                       cannot move out of here
diff --git a/src/test/ui/error-codes/E0597.nll.stderr b/src/test/ui/error-codes/E0597.nll.stderr
index 88a8a46930d..b4a1180ad54 100644
--- a/src/test/ui/error-codes/E0597.nll.stderr
+++ b/src/test/ui/error-codes/E0597.nll.stderr
@@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough
    |
 LL |     x.x = Some(&y);
    |                ^^ borrowed value does not live long enough
-LL |     //~^ `y` does not live long enough [E0597]
+LL |
 LL | }
    | -
    | |