]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/impl-object-overlap-issue-23853.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / traits / impl-object-overlap-issue-23853.rs
CommitLineData
b7449926 1// run-pass
9346a6ac
AL
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
6// this context.
7
8trait Foo { fn dummy(&self) { } }
9
10trait Bar: Foo { }
11
12impl<T:?Sized> Foo for T { }
13
14fn want_foo<B:?Sized+Foo>() { }
15
c34b1796 16fn main() {
dc9dc135 17 want_foo::<dyn Bar>();
223e47cc 18}