]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-56199.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-56199.rs
1 enum Foo {}
2 struct Bar {}
3
4 impl Foo {
5     fn foo() {
6         let _ = Self;
7         //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
8         let _ = Self();
9         //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
10     }
11 }
12
13 impl Bar {
14     fn bar() {
15         let _ = Self;
16         //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
17         let _ = Self();
18         //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
19     }
20 }
21
22 fn main() {}