Skip to content

Commit e6c5332

Browse files
Alexander Regueiropietroalbini
Alexander Regueiro
authored andcommitted
Corrected expected test err messages.
1 parent 33417ae commit e6c5332

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/test/ui/issues/issue-56199.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ struct Bar {}
55
impl 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

1414
impl 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

src/test/ui/issues/issue-56199.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
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
|
44
LL | 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
|
1212
LL | 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
|
2020
LL | 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
|
2626
LL | let _ = Self();

src/test/ui/issues/issue-56835.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pub struct Foo {}
33

44
impl 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

src/test/ui/issues/issue-56835.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
|
44
LL | fn bar(Self(foo): Self) {}

0 commit comments

Comments
 (0)