about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2017-08-19 16:33:24 -0700
committerTamir Duberstein <tamird@gmail.com>2017-08-20 18:31:36 -0400
commitc1ed862bc4dc9b83985980dd367fc0e23e7b412a (patch)
tree3dedba11b5c318e4bd48a8a1f09bfc3082318433 /src/test/compile-fail
parent3d9f57a2924f244c5ef9503432733143ba702928 (diff)
downloadrust-c1ed862bc4dc9b83985980dd367fc0e23e7b412a.tar.gz
rust-c1ed862bc4dc9b83985980dd367fc0e23e7b412a.zip
borrowck: name the correct type in error message
Closes #36407.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/issue-12567.rs8
-rw-r--r--src/test/compile-fail/move-out-of-array-1.rs2
-rw-r--r--src/test/compile-fail/move-out-of-slice-1.rs2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/test/compile-fail/issue-12567.rs b/src/test/compile-fail/issue-12567.rs
index 15d9a318d29..30cdd07b399 100644
--- a/src/test/compile-fail/issue-12567.rs
+++ b/src/test/compile-fail/issue-12567.rs
@@ -15,12 +15,12 @@ fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) {
         (&[], &[]) => println!("both empty"),
         (&[], &[hd, ..]) | (&[hd, ..], &[])
             => println!("one empty"),
-        //~^^ ERROR: cannot move out of type `[T]`, a non-copy array
-        //~^^^ ERROR: cannot move out of type `[T]`, a non-copy array
+        //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice
+        //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice
         (&[hd1, ..], &[hd2, ..])
             => println!("both nonempty"),
-        //~^^ ERROR: cannot move out of type `[T]`, a non-copy array
-        //~^^^ ERROR: cannot move out of type `[T]`, a non-copy array
+        //~^^ ERROR: cannot move out of type `[T]`, a non-copy slice
+        //~^^^ ERROR: cannot move out of type `[T]`, a non-copy slice
     }
 }
 
diff --git a/src/test/compile-fail/move-out-of-array-1.rs b/src/test/compile-fail/move-out-of-array-1.rs
index 148dec02823..796b13538b2 100644
--- a/src/test/compile-fail/move-out-of-array-1.rs
+++ b/src/test/compile-fail/move-out-of-array-1.rs
@@ -24,5 +24,5 @@ fn main() {
 }
 
 fn foo(a: [D; 4], i: usize) -> D {
-    a[i] //~ ERROR cannot move out of type `[D; 4]`
+    a[i] //~ ERROR cannot move out of type `[D; 4]`, a non-copy array
 }
diff --git a/src/test/compile-fail/move-out-of-slice-1.rs b/src/test/compile-fail/move-out-of-slice-1.rs
index f3efc68701e..9ca9e0984e4 100644
--- a/src/test/compile-fail/move-out-of-slice-1.rs
+++ b/src/test/compile-fail/move-out-of-slice-1.rs
@@ -15,7 +15,7 @@ struct A;
 fn main() {
     let a: Box<[A]> = Box::new([A]);
     match a {
-        box [a] => {}, //~ ERROR cannot move out of type `[A]`
+        box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice
         _ => {}
     }
 }