]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-56199.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[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() {}