diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-08 08:52:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 08:52:24 +0000 |
| commit | 8edcd9374a26cffa9474ce92d79c64892caef146 (patch) | |
| tree | 36b4829675d832d323283fc37457f6509f8a519c /tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr | |
| parent | 16a26f9b4658c3481d231241a6c6130edc9a6de7 (diff) | |
| parent | 2d180714e14b34e36bf883bdf706ebaf5fa96754 (diff) | |
| download | rust-8edcd9374a26cffa9474ce92d79c64892caef146.tar.gz rust-8edcd9374a26cffa9474ce92d79c64892caef146.zip | |
Merge pull request #4127 from rust-lang/rustup-2025-01-08
Automatic Rustup
Diffstat (limited to 'tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr')
| -rw-r--r-- | tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr b/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr index 80fcd714400..b985b771754 100644 --- a/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr +++ b/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr @@ -1,5 +1,5 @@ error: expected `,` - --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:12:31 + --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:16:31 | LL | if let Website { url, Some(title) } = website { | ------- ^ @@ -7,13 +7,21 @@ LL | if let Website { url, Some(title) } = website { | while parsing the fields for this pattern error[E0425]: cannot find value `title` in this scope - --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:18:30 + --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:22:30 | LL | if let Website { url, .. } = website { | ------------------- this pattern doesn't include `title`, which is available in `Website` LL | println!("[{}]({})", title, url); | ^^^^^ not found in this scope -error: aborting due to 2 previous errors +error[E0425]: cannot find value `a` in this scope + --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:28:20 + | +LL | if let Foo::Bar { .. } = x { + | --------------- this pattern doesn't include `a`, which is available in `Bar` +LL | println!("{a}"); + | ^ help: a local variable with a similar name exists: `x` + +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0425`. |
