//@ edition:2021 pub trait Trait<'a, T> {} pub struct Struct; //~^ ERROR `T` is never used pub enum Enum {} //~^ ERROR `T` is never used pub union Union { //~^ ERROR `T` is never used f1: usize, } impl<'a, T> Struct for Trait<'a, T> {} //~^ ERROR expected trait, found struct `Struct` //~| ERROR expected a type, found a trait impl<'a, T> Enum for Trait<'a, T> {} //~^ ERROR expected trait, found enum `Enum` //~| ERROR expected a type, found a trait impl<'a, T> Union for Trait<'a, T> {} //~^ ERROR expected trait, found union `Union` //~| ERROR expected a type, found a trait fn main() {}