about summary refs log tree commit diff
path: root/src/test/ui/use
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-04-22 08:40:08 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-04-22 08:40:08 +0100
commit8eef102270647af94f38274efb9a2fd5ef8a92ec (patch)
tree95d7674ad687c45b730906915e79a0993138306b /src/test/ui/use
parentaa6fb6caf9d8456c70144ccba1e969c85926e229 (diff)
downloadrust-8eef102270647af94f38274efb9a2fd5ef8a92ec.tar.gz
rust-8eef102270647af94f38274efb9a2fd5ef8a92ec.zip
update tests for migrate mode by default
Diffstat (limited to 'src/test/ui/use')
-rw-r--r--src/test/ui/use/use-after-move-based-on-type.nll.stderr13
-rw-r--r--src/test/ui/use/use-after-move-based-on-type.rs2
-rw-r--r--src/test/ui/use/use-after-move-based-on-type.stderr10
-rw-r--r--src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr14
-rw-r--r--src/test/ui/use/use-after-move-implicity-coerced-object.rs2
-rw-r--r--src/test/ui/use/use-after-move-implicity-coerced-object.stderr9
-rw-r--r--src/test/ui/use/use-after-move-self-based-on-type.nll.stderr13
-rw-r--r--src/test/ui/use/use-after-move-self-based-on-type.rs2
-rw-r--r--src/test/ui/use/use-after-move-self-based-on-type.stderr6
-rw-r--r--src/test/ui/use/use-after-move-self.nll.stderr13
-rw-r--r--src/test/ui/use/use-after-move-self.rs2
-rw-r--r--src/test/ui/use/use-after-move-self.stderr6
12 files changed, 20 insertions, 72 deletions
diff --git a/src/test/ui/use/use-after-move-based-on-type.nll.stderr b/src/test/ui/use/use-after-move-based-on-type.nll.stderr
deleted file mode 100644
index 520f88f55dc..00000000000
--- a/src/test/ui/use/use-after-move-based-on-type.nll.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0382]: borrow of moved value: `x`
-  --> $DIR/use-after-move-based-on-type.rs:4:20
-   |
-LL |     let x = "Hello!".to_string();
-   |         - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
-LL |     let _y = x;
-   |              - value moved here
-LL |     println!("{}", x);
-   |                    ^ value borrowed here after move
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/use/use-after-move-based-on-type.rs b/src/test/ui/use/use-after-move-based-on-type.rs
index fc8ea6f79eb..ba7aa0345e1 100644
--- a/src/test/ui/use/use-after-move-based-on-type.rs
+++ b/src/test/ui/use/use-after-move-based-on-type.rs
@@ -1,5 +1,5 @@
 fn main() {
     let x = "Hello!".to_string();
     let _y = x;
-    println!("{}", x); //~ ERROR use of moved value
+    println!("{}", x); //~ ERROR borrow of moved value
 }
diff --git a/src/test/ui/use/use-after-move-based-on-type.stderr b/src/test/ui/use/use-after-move-based-on-type.stderr
index b9e0aaf1f84..520f88f55dc 100644
--- a/src/test/ui/use/use-after-move-based-on-type.stderr
+++ b/src/test/ui/use/use-after-move-based-on-type.stderr
@@ -1,12 +1,12 @@
-error[E0382]: use of moved value: `x`
+error[E0382]: borrow of moved value: `x`
   --> $DIR/use-after-move-based-on-type.rs:4:20
    |
+LL |     let x = "Hello!".to_string();
+   |         - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
 LL |     let _y = x;
-   |         -- value moved here
+   |              - value moved here
 LL |     println!("{}", x);
-   |                    ^ value used here after move
-   |
-   = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
+   |                    ^ value borrowed here after move
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr
deleted file mode 100644
index e16bca38067..00000000000
--- a/src/test/ui/use/use-after-move-implicity-coerced-object.nll.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0382]: borrow of moved value: `n`
-  --> $DIR/use-after-move-implicity-coerced-object.rs:28:13
-   |
-LL |     let n: Box<_> = box Number { n: 42 };
-   |         - move occurs because `n` has type `std::boxed::Box<Number>`, which does not implement the `Copy` trait
-LL |     let mut l: Box<_> = box List { list: Vec::new() };
-LL |     l.push(n);
-   |            - value moved here
-LL |     let x = n.to_string();
-   |             ^ value borrowed here after move
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.rs b/src/test/ui/use/use-after-move-implicity-coerced-object.rs
index e4350691664..2e465ee8962 100644
--- a/src/test/ui/use/use-after-move-implicity-coerced-object.rs
+++ b/src/test/ui/use/use-after-move-implicity-coerced-object.rs
@@ -26,5 +26,5 @@ fn main() {
     let mut l: Box<_> = box List { list: Vec::new() };
     l.push(n);
     let x = n.to_string();
-    //~^ ERROR: use of moved value: `n`
+    //~^ ERROR: borrow of moved value: `n`
 }
diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr
index babff9be252..e16bca38067 100644
--- a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr
+++ b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr
@@ -1,12 +1,13 @@
-error[E0382]: use of moved value: `n`
+error[E0382]: borrow of moved value: `n`
   --> $DIR/use-after-move-implicity-coerced-object.rs:28:13
    |
+LL |     let n: Box<_> = box Number { n: 42 };
+   |         - move occurs because `n` has type `std::boxed::Box<Number>`, which does not implement the `Copy` trait
+LL |     let mut l: Box<_> = box List { list: Vec::new() };
 LL |     l.push(n);
    |            - value moved here
 LL |     let x = n.to_string();
-   |             ^ value used here after move
-   |
-   = note: move occurs because `n` has type `std::boxed::Box<Number>`, which does not implement the `Copy` trait
+   |             ^ value borrowed here after move
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr b/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr
deleted file mode 100644
index 9bf1175430c..00000000000
--- a/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0382]: use of moved value: `self`
-  --> $DIR/use-after-move-self-based-on-type.rs:12:16
-   |
-LL |     pub fn foo(self) -> isize {
-   |                ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
-LL |         self.bar();
-   |         ---- value moved here
-LL |         return self.x;
-   |                ^^^^^^ value used here after move
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/use/use-after-move-self-based-on-type.rs b/src/test/ui/use/use-after-move-self-based-on-type.rs
index 4d84ae9b271..9325834954f 100644
--- a/src/test/ui/use/use-after-move-self-based-on-type.rs
+++ b/src/test/ui/use/use-after-move-self-based-on-type.rs
@@ -9,7 +9,7 @@ impl Drop for S {
 impl S {
     pub fn foo(self) -> isize {
         self.bar();
-        return self.x;  //~ ERROR use of moved value: `self.x`
+        return self.x;  //~ ERROR use of moved value: `self`
     }
 
     pub fn bar(self) {}
diff --git a/src/test/ui/use/use-after-move-self-based-on-type.stderr b/src/test/ui/use/use-after-move-self-based-on-type.stderr
index d1d26069fdf..9bf1175430c 100644
--- a/src/test/ui/use/use-after-move-self-based-on-type.stderr
+++ b/src/test/ui/use/use-after-move-self-based-on-type.stderr
@@ -1,12 +1,12 @@
-error[E0382]: use of moved value: `self.x`
+error[E0382]: use of moved value: `self`
   --> $DIR/use-after-move-self-based-on-type.rs:12:16
    |
+LL |     pub fn foo(self) -> isize {
+   |                ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
 LL |         self.bar();
    |         ---- value moved here
 LL |         return self.x;
    |                ^^^^^^ value used here after move
-   |
-   = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/use/use-after-move-self.nll.stderr b/src/test/ui/use/use-after-move-self.nll.stderr
deleted file mode 100644
index 3be0a65550b..00000000000
--- a/src/test/ui/use/use-after-move-self.nll.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0382]: use of moved value: `self`
-  --> $DIR/use-after-move-self.rs:10:16
-   |
-LL |     pub fn foo(self) -> isize {
-   |                ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
-LL |         self.bar();
-   |         ---- value moved here
-LL |         return *self.x;
-   |                ^^^^^^^ value used here after move
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/use/use-after-move-self.rs b/src/test/ui/use/use-after-move-self.rs
index 1337d61a6d8..a6f6c45573d 100644
--- a/src/test/ui/use/use-after-move-self.rs
+++ b/src/test/ui/use/use-after-move-self.rs
@@ -7,7 +7,7 @@ struct S {
 impl S {
     pub fn foo(self) -> isize {
         self.bar();
-        return *self.x;  //~ ERROR use of moved value: `*self.x`
+        return *self.x;  //~ ERROR use of moved value: `self`
     }
 
     pub fn bar(self) {}
diff --git a/src/test/ui/use/use-after-move-self.stderr b/src/test/ui/use/use-after-move-self.stderr
index 2c4bd202681..3be0a65550b 100644
--- a/src/test/ui/use/use-after-move-self.stderr
+++ b/src/test/ui/use/use-after-move-self.stderr
@@ -1,12 +1,12 @@
-error[E0382]: use of moved value: `*self.x`
+error[E0382]: use of moved value: `self`
   --> $DIR/use-after-move-self.rs:10:16
    |
+LL |     pub fn foo(self) -> isize {
+   |                ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
 LL |         self.bar();
    |         ---- value moved here
 LL |         return *self.x;
    |                ^^^^^^^ value used here after move
-   |
-   = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait
 
 error: aborting due to previous error