2014-05-05 18:56:44 -07:00
|
|
|
// Test that an object type `Box<Foo>` is not considered to implement the
|
2013-03-05 17:49:50 -05:00
|
|
|
// trait `Foo`. Issue #5087.
|
2012-08-28 15:54:45 -07:00
|
|
|
|
2015-04-17 22:12:20 -07:00
|
|
|
trait Foo {}
|
2013-03-05 17:49:50 -05:00
|
|
|
fn take_foo<F:Foo>(f: F) {}
|
2019-05-28 14:46:13 -04:00
|
|
|
fn take_object(f: Box<dyn Foo>) { take_foo(f); }
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR `Box<dyn Foo>: Foo` is not satisfied
|
2013-03-05 17:49:50 -05:00
|
|
|
fn main() {}
|