diff options
| author | bors <bors@rust-lang.org> | 2025-02-06 20:56:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-06 20:56:48 +0000 |
| commit | 38213856a8a3a6d49a234e0d95a722a4f28a2b18 (patch) | |
| tree | ee486aab46d9b430698ffcc3d2e71fe1ce83bf5b /tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr | |
| parent | 0277061b9a4096437b9b35f471c915e1cbe3128f (diff) | |
| parent | bf24cade3ef2aae66a5047f762d66b70d2b4b92f (diff) | |
| download | rust-38213856a8a3a6d49a234e0d95a722a4f28a2b18.tar.gz rust-38213856a8a3a6d49a234e0d95a722a4f28a2b18.zip | |
Auto merge of #136650 - cuviper:beta-next, r=cuviper
[beta] backports - Ensure that we don't try to access fields on a non-struct pattern type #135222 - Do not include GCC source code in source tarballs #135658 - Temporarily bring back `Rvalue::Len` #135709 - Add a couple of missing `ensure_sufficient_stacks` #136352 - Enable kernel sanitizers for aarch64-unknown-none-softfloat #135905 r? cuviper
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`. |
