diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-12-15 22:58:16 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-12-15 22:58:16 +0000 |
| commit | 733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e (patch) | |
| tree | 76019f347ad1f93c992f49328d0d1ac2aaa5ef1b /tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.stderr | |
| parent | 8c8e8d35bc207353977d44344506eda40bf502f5 (diff) | |
| download | rust-733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e.tar.gz rust-733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e.zip | |
Use `span_label` as it looks better when we show pattern missing binding in order
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 | 17 |
1 files changed, 3 insertions, 14 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 9d2fca8eab9..80fcd714400 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 @@ -7,23 +7,12 @@ 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:19:30 + --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:18: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 - | -note: `Website` has a field `title` which could have been included in this pattern, but it wasn't - --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:17:12 - | -LL | / struct Website { -LL | | url: String, -LL | | title: Option<String> , - | | ----- defined here -LL | | } - | |_- -... -LL | if let Website { url, .. } = website { - | ^^^^^^^^^^^^^^^^^^^ this pattern doesn't include `title`, which is available in `Website` error: aborting due to 2 previous errors |
