about summary refs log tree commit diff
path: root/src/test/compile-fail/class-cast-to-trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/class-cast-to-trait.rs')
-rw-r--r--src/test/compile-fail/class-cast-to-trait.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs
index 506e1cba9fd..c4344db027b 100644
--- a/src/test/compile-fail/class-cast-to-trait.rs
+++ b/src/test/compile-fail/class-cast-to-trait.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+
 trait noisy {
   fn speak(&self);
 }
@@ -57,6 +58,6 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 }
 
 fn main() {
-  let nyan: ~noisy = ~cat(0, 2, "nyan".to_owned()) as ~noisy;
+  let nyan: Box<noisy> = box cat(0, 2, "nyan".to_owned()) as Box<noisy>;
   nyan.eat(); //~ ERROR does not implement any method in scope named `eat`
 }