summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs
blob: 03c7ed347bddf3cdedbed26ccf26b8c63dc41013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// edition:2021

pub trait Trait<'a, T> {}

pub struct Struct<T>;
pub enum Enum<T> {}

pub union Union<T> {
    f1: usize,
}

impl<'a, T> Struct<T> for Trait<'a, T> {}
//~^ ERROR expected trait, found struct `Struct`
//~| ERROR trait objects must include the `dyn` keyword

impl<'a, T> Enum<T> for Trait<'a, T> {}
//~^ ERROR expected trait, found enum `Enum`

impl<'a, T> Union<T> for Trait<'a, T> {}
//~^ ERROR expected trait, found union `Union`

fn main() {}