2 // Test that we are able to compile the case where both a blanket impl
3 // and the object type itself supply the required trait obligation.
4 // In this case, the blanket impl for `Foo` applies to any type,
5 // including `Bar`, but the object type `Bar` also implicitly supplies
8 trait Foo { fn dummy(&self) { } }
12 impl<T:?Sized> Foo for T { }
14 fn want_foo<B:?Sized+Foo>() { }
17 want_foo::<dyn Bar>();