1 // Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
2 // though we see no impl of `Sugar` for `Box`. Therefore, an overlap
3 // error is reported for the following pair of impls (#23516).
5 pub trait Sugar { fn dummy(&self) { } }
6 pub trait Sweet { fn dummy(&self) { } }
7 impl<T:Sugar> Sweet for T { }
8 impl<U:Sugar> Sweet for Box<U> { }