]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-does-not-impl-trait.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / object-does-not-impl-trait.rs
1 // Test that an object type `Box<Foo>` is not considered to implement the
2 // trait `Foo`. Issue #5087.
3
4 trait Foo {}
5 fn take_foo<F:Foo>(f: F) {}
6 fn take_object(f: Box<dyn Foo>) { take_foo(f); }
7 //~^ ERROR `Box<dyn Foo>: Foo` is not satisfied
8 fn main() {}