// This used to ICE in an earlier iteration of #117164. // The normalization performed during orphan checking happens inside an empty ParamEnv and // with type parameters mapped to fresh infer vars. Therefore it may fail for example due to // unsatisfied bounds while normalization outside of orphan checking succeeds. //@ revisions: classic next //@[next] compile-flags: -Znext-solver //@ check-pass //@ aux-crate:foreign=parametrized-trait.rs //@ edition:2021 struct Wrapper(T); trait Bound {} trait Discard { type Output; } impl Discard for Wrapper where Wrapper: Bound { type Output = LocalTy; } struct LocalTy; impl foreign::Trait1 for as Discard>::Output //~^ WARNING type parameter `T` must be covered by another type //~| WARNING this was previously accepted by the compiler where Wrapper: Bound {} fn main() {}