Corrected expected test err messages.

This commit is contained in:
Alexander Regueiro 2018-12-15 17:31:46 +00:00
parent 616885ec2c
commit 0211856c0e
4 changed files with 10 additions and 10 deletions

View File

@ -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
}
}

View File

@ -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();

View File

@ -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]
}

View File

@ -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) {}