]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/class-cast-to-trait.rs
Rollup merge of #103159 - cuviper:check_pow-final-try_opt, r=Mark-Simulacrum
[rust.git] / src / test / ui / class-cast-to-trait.rs
index bb4c3fac93806e8303d9301609558cb083dfd653..345d6efd2d90ada0f1893a39d027d9033d32d9fb 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(box_syntax)]
-
 trait Noisy {
   fn speak(&self);
 }
@@ -48,7 +46,9 @@ fn cat(in_x : usize, in_y : isize, in_name: String) -> Cat {
     }
 }
 
+
+
 fn main() {
-  let nyan: Box<dyn Noisy> = box cat(0, 2, "nyan".to_string()) as Box<dyn Noisy>;
+  let nyan: Box<dyn Noisy> = Box::new(cat(0, 2, "nyan".to_string())) as Box<dyn Noisy>;
   nyan.eat(); //~ ERROR no method named `eat` found
 }