2024-07-10 09:03:20 -05:00
|
|
|
// Added in #124532. While `(): Super` is knowable, `(): Sub<?t>` is not.
|
|
|
|
//
|
|
|
|
// We therefore elaborate super trait bounds in the implicit negative
|
|
|
|
// overlap check.
|
|
|
|
|
2024-09-21 02:02:51 -05:00
|
|
|
//@ check-pass
|
2024-07-10 09:03:20 -05:00
|
|
|
|
|
|
|
trait Super {}
|
|
|
|
trait Sub<T>: Super {}
|
|
|
|
|
|
|
|
trait Overlap<T> {}
|
|
|
|
impl<T, U: Sub<T>> Overlap<T> for U {}
|
|
|
|
impl<T> Overlap<T> for () {}
|
|
|
|
|
|
|
|
fn main() {}
|