2022-06-06 12:33:23 -05:00
|
|
|
//@ edition:2021
|
|
|
|
|
|
|
|
pub trait Trait<'a, T> {}
|
|
|
|
|
2022-06-09 03:52:10 -05:00
|
|
|
pub struct Struct<T>;
|
2024-02-23 05:45:44 -06:00
|
|
|
//~^ ERROR `T` is never used
|
2022-06-09 03:52:10 -05:00
|
|
|
pub enum Enum<T> {}
|
2024-02-23 05:45:44 -06:00
|
|
|
//~^ ERROR `T` is never used
|
2022-06-09 03:52:10 -05:00
|
|
|
|
|
|
|
pub union Union<T> {
|
2024-02-23 05:45:44 -06:00
|
|
|
//~^ ERROR `T` is never used
|
2022-06-09 03:52:10 -05:00
|
|
|
f1: usize,
|
|
|
|
}
|
2022-06-06 12:33:23 -05:00
|
|
|
|
|
|
|
impl<'a, T> Struct<T> for Trait<'a, T> {}
|
|
|
|
//~^ ERROR expected trait, found struct `Struct`
|
2024-10-04 09:10:28 -05:00
|
|
|
//~| ERROR expected a type, found a trait
|
2022-06-06 12:33:23 -05:00
|
|
|
|
2022-06-09 03:52:10 -05:00
|
|
|
impl<'a, T> Enum<T> for Trait<'a, T> {}
|
|
|
|
//~^ ERROR expected trait, found enum `Enum`
|
2024-10-04 09:10:28 -05:00
|
|
|
//~| ERROR expected a type, found a trait
|
2022-06-09 03:52:10 -05:00
|
|
|
|
|
|
|
impl<'a, T> Union<T> for Trait<'a, T> {}
|
|
|
|
//~^ ERROR expected trait, found union `Union`
|
2024-10-04 09:10:28 -05:00
|
|
|
//~| ERROR expected a type, found a trait
|
2022-06-09 03:52:10 -05:00
|
|
|
|
2022-06-06 12:33:23 -05:00
|
|
|
fn main() {}
|