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.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs
index a2a5a3e257f..5166ef8f72f 100644
--- a/src/test/compile-fail/destructure-trait-ref.rs
+++ b/src/test/compile-fail/destructure-trait-ref.rs
@@ -11,8 +11,10 @@
 // The regression test for #15031 to make sure destructuring trait
 // reference work properly.
 
+#![feature(box_syntax)]
+
 trait T {}
-impl T for int {}
+impl T for isize {}
 
 fn main() {
     // For an expression of the form:
@@ -25,17 +27,17 @@ fn main() {
     // if n > m, it's a type mismatch error.
 
     // n < m
-    let &x = &(&1i as &T);
-    let &x = &&(&1i as &T);
-    let &&x = &&(&1i as &T);
+    let &x = &(&1is as &T);
+    let &x = &&(&1is as &T);
+    let &&x = &&(&1is as &T);
 
     // n == m
-    let &x = &1i as &T;      //~ ERROR type `&T` cannot be dereferenced
-    let &&x = &(&1i as &T);  //~ ERROR type `&T` cannot be dereferenced
-    let box x = box 1i as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced
+    let &x = &1is as &T;      //~ ERROR type `&T` cannot be dereferenced
+    let &&x = &(&1is as &T);  //~ ERROR type `&T` cannot be dereferenced
+    let box x = box 1is as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced
 
     // n > m
-    let &&x = &1i as &T;     //~ ERROR found &-ptr
-    let &&&x = &(&1i as &T); //~ ERROR found &-ptr
-    let box box x = box 1i as Box<T>;    //~ ERROR found box
+    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
 }