//@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass // Ensure we don't have ambiguity when upcasting to two supertraits // that are identical modulo normalization. trait Supertrait { fn method(&self) {} } impl Supertrait for () {} trait Identity { type Selff; } impl Identity for Selff { type Selff = Selff; } trait Trait

: Supertrait<()> + Supertrait<

::Selff> {} impl

Trait

for () {} fn main() { let x: &dyn Trait<()> = &(); let x: &dyn Supertrait<()> = x; }