diff options
Diffstat (limited to 'tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs')
| -rw-r--r-- | tests/ui/pattern/struct-pattern-with-missing-fields-resolve-error.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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<String> ,//~ NOTE defined here + title: Option<String>, } 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 } |
