]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/object-does-not-impl-trait.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / object-does-not-impl-trait.rs
index 95f92380816657bd029ffdc8e61854fbb5f80ee9..cfaf149a49cac6f4d4d2b2f45897e4d63688dd0a 100644 (file)
@@ -8,10 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that an object type `~Foo` is not considered to implement the
+// Test that an object type `Box<Foo>` is not considered to implement the
 // trait `Foo`. Issue #5087.
 
+
 trait Foo {}
 fn take_foo<F:Foo>(f: F) {}
-fn take_object(f: ~Foo) { take_foo(f); } //~ ERROR failed to find an implementation of trait
+fn take_object(f: Box<Foo>) { take_foo(f); }
+//~^ ERROR the trait `Foo` is not implemented
 fn main() {}