diff --git a/src/test/ui/issues/issue-56199.rs b/src/test/ui/issues/issue-56199.rs index bbd51823cf1af..83d4e31b5d126 100644 --- a/src/test/ui/issues/issue-56199.rs +++ b/src/test/ui/issues/issue-56199.rs @@ -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 } } diff --git a/src/test/ui/issues/issue-56199.stderr b/src/test/ui/issues/issue-56199.stderr index feb88e926b2d8..6e3c7fd17b437 100644 --- a/src/test/ui/issues/issue-56199.stderr +++ b/src/test/ui/issues/issue-56199.stderr @@ -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(); diff --git a/src/test/ui/issues/issue-56835.rs b/src/test/ui/issues/issue-56835.rs index 0b3a665ccf9fd..c16550e370179 100644 --- a/src/test/ui/issues/issue-56835.rs +++ b/src/test/ui/issues/issue-56835.rs @@ -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] } diff --git a/src/test/ui/issues/issue-56835.stderr b/src/test/ui/issues/issue-56835.stderr index 32bbc49ffd991..b7c3b142ec452 100644 --- a/src/test/ui/issues/issue-56835.stderr +++ b/src/test/ui/issues/issue-56835.stderr @@ -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) {}