From 733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sun, 15 Dec 2024 22:58:16 +0000 Subject: Use `span_label` as it looks better when we show pattern missing binding in order --- tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs') diff --git a/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs b/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs index 7238a0a7bb7..225891e390f 100644 --- a/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs +++ b/tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs @@ -1,6 +1,6 @@ struct Website { url: String, - title: Option ,//~ NOTE defined here + title: Option, } fn main() { @@ -14,8 +14,7 @@ fn main() { println!("[{}]({})", title, url); // we hide the errors for `title` and `url` } - if let Website { url, .. } = website { //~ NOTE `Website` has a field `title` - //~^ NOTE this pattern + if let Website { url, .. } = website { //~ NOTE this pattern println!("[{}]({})", title, url); //~ ERROR cannot find value `title` in this scope //~^ NOTE not found in this scope } -- cgit 1.4.1-3-g733a5