about summary refs log tree commit diff
path: root/src/test/compile-fail/destructure-trait-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/destructure-trait-ref.rs')
-rw-r--r--src/test/compile-fail/destructure-trait-ref.rs21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs
index 5166ef8f72f..5cc0d6a143a 100644
--- a/src/test/compile-fail/destructure-trait-ref.rs
+++ b/src/test/compile-fail/destructure-trait-ref.rs
@@ -37,7 +37,22 @@ fn main() {
     let box x = box 1is as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced
 
     // n > m
-    let &&x = &1is as &T;     //~ ERROR found &-ptr
-    let &&&x = &(&1is as &T); //~ ERROR found &-ptr
-    let box box x = box 1is as Box<T>;    //~ ERROR found box
+    let &&x = &1is as &T;
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `&_`
+    //~| expected trait T
+    //~| found &-ptr
+    let &&&x = &(&1is as &T);
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `&_`
+    //~| expected trait T
+    //~| found &-ptr
+    let box box x = box 1is as Box<T>;
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `Box<_>`
+    //~| expected trait T
+    //~| found box
 }