From 0959f0f912c1029f0dfd3de431786433211a1f2d Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 26 Jan 2021 11:24:43 -0800 Subject: Tweak suggestion for missing field in patterns Account for parser recovered struct and tuple patterns to avoid invalid suggestion. Follow up to #81103. --- src/test/ui/error-codes/E0027.stderr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0027.stderr b/src/test/ui/error-codes/E0027.stderr index 694bbc358fe..a3dd6910be4 100644 --- a/src/test/ui/error-codes/E0027.stderr +++ b/src/test/ui/error-codes/E0027.stderr @@ -7,11 +7,11 @@ LL | Dog { age: x } => {} help: include the missing field in the pattern | LL | Dog { age: x, name } => {} - | ^^^^^^ + | ^^^^^^^^ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { age: x, .. } => {} - | ^^^^ + | ^^^^^^ error[E0027]: pattern does not mention field `age` --> $DIR/E0027.rs:15:9 @@ -22,11 +22,11 @@ LL | Dog { name: x, } => {} help: include the missing field in the pattern | LL | Dog { name: x, age } => {} - | ^^^^^ + | ^^^^^^^ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { name: x, .. } => {} - | ^^^^ + | ^^^^^^ error[E0027]: pattern does not mention field `age` --> $DIR/E0027.rs:19:9 @@ -37,11 +37,11 @@ LL | Dog { name: x , } => {} help: include the missing field in the pattern | LL | Dog { name: x, age } => {} - | ^^^^^ + | ^^^^^^^ help: if you don't care about this missing field, you can explicitly ignore it | LL | Dog { name: x, .. } => {} - | ^^^^ + | ^^^^^^ error[E0027]: pattern does not mention fields `name`, `age` --> $DIR/E0027.rs:22:9 -- cgit 1.4.1-3-g733a5