about summary refs log tree commit diff
path: root/tests/ui/suggestions/suggest-struct-or-union-add-generic-impl-trait.rs
blob: 9963b5be4f2b85c01ae435240d2cb941b71f1a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//@ edition:2021
trait Trait {}

struct Foo1 {
    a: Trait,
    //~^ ERROR expected a type, found a trait
    b: u32,
}

struct Foo2 {
    a: i32,
    b: Trait,
    //~^ ERROR expected a type, found a trait
}


enum Enum1 {
    A(Trait),
    //~^ ERROR expected a type, found a trait
    B(u32),
}

enum Enum2 {
    A(u32),
    B(Trait),
    //~^ ERROR expected a type, found a trait
}


fn main() {}