//@ compile-flags: -Znext-solver //@ check-pass // Regression test for trait-system-refactor-initiative#84. // // We try to infer `T::Rigid: Into` and have 2 candidates from where-clauses: // // - `Into` // - `Into<::Assoc>` // // This causes ambiguity unless we normalize the alias in the second candidate // to detect that they actually result in the same constraints. trait Trait { type Rigid: Elaborate + Into + Default; } trait Elaborate: Into { type Assoc; } fn test() { let rigid: T::Rigid = Default::default(); drop(rigid.into()); } fn main() {}