diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2021-01-26 11:24:43 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2021-01-26 11:27:53 -0800 |
| commit | 0959f0f912c1029f0dfd3de431786433211a1f2d (patch) | |
| tree | 7e3b8585ca59f3c85270f3340aac37feb7dd2828 /src/test/ui/error-codes | |
| parent | 7907345e58b4f4d2c95e5ea9b8e0b3bff8946523 (diff) | |
| download | rust-0959f0f912c1029f0dfd3de431786433211a1f2d.tar.gz rust-0959f0f912c1029f0dfd3de431786433211a1f2d.zip | |
Tweak suggestion for missing field in patterns
Account for parser recovered struct and tuple patterns to avoid invalid suggestion. Follow up to #81103.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0027.stderr | 12 |
1 files changed, 6 insertions, 6 deletions
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 |
