Skip to content

Commit

Permalink
Corrected expected test err messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Regueiro authored and pietroalbini committed Dec 31, 2018
1 parent 33417ae commit e6c5332
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/test/ui/issues/issue-56199.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/issues/issue-56199.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
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;
| ^^^^
|
= 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();
| ^^^^
|
= 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();
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-56835.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-56835.stderr
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down

0 comments on commit e6c5332

Please sign in to comment.