Corrected expected test err messages.
This commit is contained in:
parent
616885ec2c
commit
0211856c0e
@ -5,18 +5,18 @@ struct Bar {}
|
||||
impl Foo {
|
||||
fn foo() {
|
||||
let _ = Self;
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple structs
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple or unit structs
|
||||
let _ = Self();
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple structs
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple or unit structs
|
||||
}
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
fn bar() {
|
||||
let _ = Self;
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple structs
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple or unit structs
|
||||
let _ = Self();
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple structs
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple or unit structs
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: the `Self` constructor can only be used with tuple structs
|
||||
error: the `Self` constructor can only be used with tuple or unit structs
|
||||
--> $DIR/issue-56199.rs:7:17
|
||||
|
|
||||
LL | let _ = Self;
|
||||
@ -6,7 +6,7 @@ LL | let _ = Self;
|
||||
|
|
||||
= note: did you mean to use one of the enum's variants?
|
||||
|
||||
error: the `Self` constructor can only be used with tuple structs
|
||||
error: the `Self` constructor can only be used with tuple or unit structs
|
||||
--> $DIR/issue-56199.rs:9:17
|
||||
|
|
||||
LL | let _ = Self();
|
||||
@ -14,13 +14,13 @@ LL | let _ = Self();
|
||||
|
|
||||
= note: did you mean to use one of the enum's variants?
|
||||
|
||||
error: the `Self` constructor can only be used with tuple structs
|
||||
error: the `Self` constructor can only be used with tuple or unit structs
|
||||
--> $DIR/issue-56199.rs:16:17
|
||||
|
|
||||
LL | let _ = Self;
|
||||
| ^^^^ did you mean `Self { /* fields */ }`?
|
||||
|
||||
error: the `Self` constructor can only be used with tuple structs
|
||||
error: the `Self` constructor can only be used with tuple or unit structs
|
||||
--> $DIR/issue-56199.rs:18:17
|
||||
|
|
||||
LL | let _ = Self();
|
||||
|
@ -3,7 +3,7 @@ pub struct Foo {}
|
||||
|
||||
impl Foo {
|
||||
fn bar(Self(foo): Self) {}
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple structs
|
||||
//~^ ERROR the `Self` constructor can only be used with tuple or unit structs
|
||||
//~^^ ERROR expected tuple struct/variant, found self constructor `Self` [E0164]
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: the `Self` constructor can only be used with tuple structs
|
||||
error: the `Self` constructor can only be used with tuple or unit structs
|
||||
--> $DIR/issue-56835.rs:5:12
|
||||
|
|
||||
LL | fn bar(Self(foo): Self) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user