// Regression test for issue #59342 // Checks that we properly detect defining uses of opaque // types in 'item' position when generic parameters are involved // //@ run-pass #![feature(impl_trait_in_assoc_type)] trait Meow { //~ WARN trait `Meow` is never used type MeowType; fn meow(self) -> Self::MeowType; } impl Meow for I where I: Iterator, { type MeowType = impl Iterator; fn meow(self) -> Self::MeowType { self } } fn main() {}