// Regression test for issue #99554. // Projections might not cover type parameters. //@ revisions: classic next //@[next] compile-flags: -Znext-solver //@ check-pass //@ compile-flags: --crate-type=lib //@ aux-crate:foreign=parametrized-trait.rs //@ edition:2021 trait Identity { type Output; } impl Identity for T { type Output = T; } struct Local; impl foreign::Trait0 for ::Output {} //~^ WARNING type parameter `T` must be covered by another type //~| WARNING this was previously accepted by the compiler impl foreign::Trait0<::Output, Local, T> for Option {} //~^ WARNING type parameter `T` must be covered by another type //~| WARNING this was previously accepted by the compiler pub trait Deferred { type Output; } // A downstream user could implement // // impl Deferred for Type { type Output = T; } // struct Type(T); // impl foreign::Trait1 for ::Output {} //~^ WARNING type parameter `T` must be covered by another type //~| WARNING this was previously accepted by the compiler