]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-56199.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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() {}