summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-56199.rs
blob: ba11582a9d59142c0fa291f38ae18063067bc2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
enum Foo {}
struct Bar {}

impl Foo {
    fn foo() {
        let _ = Self;
        //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
        let _ = Self();
        //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
    }
}

impl Bar {
    fn bar() {
        let _ = Self;
        //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
        let _ = Self();
        //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
    }
}

fn main() {}