]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/trait-coercion-generic-bad.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / trait-coercion-generic-bad.rs
index 2d73158add2e14176f99033d21643d957a6737b9..74982946d7ddd6f591e2440d55843e53cf5d7245 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[feature(managed_boxes)];
 
 struct Struct {
     person: &'static str
@@ -25,8 +24,7 @@ fn f(&self, x: &'static str) {
 }
 
 fn main() {
-    let s: @Trait<int> = @Struct { person: "Fred" };    //~ ERROR expected Trait<int>, but found Trait<&'static str>
-    //~^ ERROR expected Trait<int>, but found Trait<&'static str>
+    let s: Box<Trait<int>> = box Struct { person: "Fred" };
+    //~^ ERROR type mismatch
     s.f(1);
 }
-