File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ struct Bar {}
55impl Foo {
66 fn foo ( ) {
77 let _ = Self ;
8- //~^ ERROR the `Self` constructor can only be used with tuple structs
8+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
99 let _ = Self ( ) ;
10- //~^ ERROR the `Self` constructor can only be used with tuple structs
10+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
1111 }
1212}
1313
1414impl Bar {
1515 fn bar ( ) {
1616 let _ = Self ;
17- //~^ ERROR the `Self` constructor can only be used with tuple structs
17+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
1818 let _ = Self ( ) ;
19- //~^ ERROR the `Self` constructor can only be used with tuple structs
19+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
2020 }
2121}
2222
Original file line number Diff line number Diff line change 1- error: the `Self` constructor can only be used with tuple structs
1+ error: the `Self` constructor can only be used with tuple or unit structs
22 --> $DIR/issue-56199.rs:7:17
33 |
44LL | let _ = Self;
55 | ^^^^
66 |
77 = note: did you mean to use one of the enum's variants?
88
9- error: the `Self` constructor can only be used with tuple structs
9+ error: the `Self` constructor can only be used with tuple or unit structs
1010 --> $DIR/issue-56199.rs:9:17
1111 |
1212LL | let _ = Self();
1313 | ^^^^
1414 |
1515 = note: did you mean to use one of the enum's variants?
1616
17- error: the `Self` constructor can only be used with tuple structs
17+ error: the `Self` constructor can only be used with tuple or unit structs
1818 --> $DIR/issue-56199.rs:16:17
1919 |
2020LL | let _ = Self;
2121 | ^^^^ did you mean `Self { /* fields */ }`?
2222
23- error: the `Self` constructor can only be used with tuple structs
23+ error: the `Self` constructor can only be used with tuple or unit structs
2424 --> $DIR/issue-56199.rs:18:17
2525 |
2626LL | let _ = Self();
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pub struct Foo {}
33
44impl Foo {
55 fn bar ( Self ( foo) : Self ) { }
6- //~^ ERROR the `Self` constructor can only be used with tuple structs
6+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
77 //~^^ ERROR expected tuple struct/variant, found self constructor `Self` [E0164]
88}
99
Original file line number Diff line number Diff line change 1- error: the `Self` constructor can only be used with tuple structs
1+ error: the `Self` constructor can only be used with tuple or unit structs
22 --> $DIR/issue-56835.rs:5:12
33 |
44LL | fn bar(Self(foo): Self) {}
You can’t perform that action at this time.
0 commit comments