about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-16 20:00:22 +0100
committerGitHub <noreply@github.com>2024-12-16 20:00:22 +0100
commit86db97e2b3c50729d30b08d77dae67318d3cc2e1 (patch)
tree4fdd0c7109aea7129b211b66de1b1d6fdbcb6e21 /tests/coverage/branch/lazy-boolean.rs
parentd9ba4bf6feb9b49f6a7e63097705cc39cef63234 (diff)
parent733fd03f0f9d5c8ad595f7b7cde17d3c1f33a19e (diff)
downloadrust-86db97e2b3c50729d30b08d77dae67318d3cc2e1.tar.gz
rust-86db97e2b3c50729d30b08d77dae67318d3cc2e1.zip
Rollup merge of #134284 - estebank:issue-74863, r=lcnr
Keep track of patterns that could have introduced a binding, but didn't

When we recover from a pattern parse error, or a pattern uses `..`, we keep track of that and affect resolution error for missing bindings that could have been provided by that pattern. We differentiate between `..` and parse recovery. We silence resolution errors likely caused by the pattern parse error.

```
error[E0425]: cannot find value `title` in this scope
  --> $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
```

Fix #74863.
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions