about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-10-25 20:15:15 +0400
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-11-21 22:40:06 +0300
commit7a5376d23cb3324edcfaa278a9387898960d5f7c (patch)
tree4bb2b3044fc029c8fb3d1a4cbbf91907c214540e /src/test/ui/parser
parent1cbc45942d5c0f6eb5d94e3b10762ba541958035 (diff)
Unreserve braced enum variants in value namespace
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/recover-from-bad-variant.stderr11
-rw-r--r--src/test/ui/parser/struct-literal-variant-in-if.stderr9
2 files changed, 6 insertions, 14 deletions
diff --git a/src/test/ui/parser/recover-from-bad-variant.stderr b/src/test/ui/parser/recover-from-bad-variant.stderr
index 483312c16cc..04968bbdf99 100644
--- a/src/test/ui/parser/recover-from-bad-variant.stderr
+++ b/src/test/ui/parser/recover-from-bad-variant.stderr
@@ -14,14 +14,11 @@ LL -     let x = Enum::Foo(a: 3, b: 4);
 LL +     let x = Enum::Foo(3, 4);
    |
 
-error[E0532]: expected tuple struct or tuple variant, found struct variant `Enum::Foo`
+error[E0164]: expected tuple struct or tuple variant, found struct variant `Enum::Foo`
   --> $DIR/recover-from-bad-variant.rs:10:9
    |
-LL |     Foo { a: usize, b: usize },
-   |     -------------------------- `Enum::Foo` defined here
-...
 LL |         Enum::Foo(a, b) => {}
-   |         ^^^^^^^^^^^^^^^ help: use struct pattern syntax instead: `Enum::Foo { a, b }`
+   |         ^^^^^^^^^^^^^^^ not a tuple struct or tuple variant
 
 error[E0769]: tuple variant `Enum::Bar` written as struct variant
   --> $DIR/recover-from-bad-variant.rs:12:9
@@ -36,5 +33,5 @@ LL |         Enum::Bar(a, b) => {}
 
 error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0532, E0769.
-For more information about an error, try `rustc --explain E0532`.
+Some errors have detailed explanations: E0164, E0769.
+For more information about an error, try `rustc --explain E0164`.
diff --git a/src/test/ui/parser/struct-literal-variant-in-if.stderr b/src/test/ui/parser/struct-literal-variant-in-if.stderr
index 4cffbe433b8..9f0c0074d67 100644
--- a/src/test/ui/parser/struct-literal-variant-in-if.stderr
+++ b/src/test/ui/parser/struct-literal-variant-in-if.stderr
@@ -42,16 +42,11 @@ help: surround the struct literal with parentheses
 LL |     if x == (E::K { field: "" }) {}
    |             +                  +
 
-error[E0423]: expected value, found struct variant `E::V`
+error[E0533]: expected value, found struct variant `E::V`
   --> $DIR/struct-literal-variant-in-if.rs:10:13
    |
 LL |     if x == E::V { field } {}
    |             ^^^^ not a value
-   |
-help: surround the struct literal with parentheses
-   |
-LL |     if x == (E::V { field }) {}
-   |             +              +
 
 error[E0308]: mismatched types
   --> $DIR/struct-literal-variant-in-if.rs:10:20
@@ -72,5 +67,5 @@ LL |     let y: usize = ();
 
 error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0308, E0423.
+Some errors have detailed explanations: E0308, E0533.
 For more information about an error, try `rustc --explain E0308`.