rust/compiler/rustc_parse/src/parser
Matthias Krüger 86db97e2b3
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.
2024-12-16 20:00:22 +01:00
..
mut_visit Reformat use declarations. 2024-07-29 08:26:52 +10:00
tokenstream allow symbol_intern_string_literal lint in test modules 2024-12-11 20:38:55 +03:00
attr_wrapper.rs Introduce InvisibleOrigin on invisible delimiters. 2024-11-21 08:16:54 +11:00
attr.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
diagnostics.rs Remove PErr. 2024-12-12 11:31:55 +11:00
expr.rs Rollup merge of #134140 - compiler-errors:unsafe-binders-ast, r=oli-obk 2024-12-13 17:25:31 +01:00
generics.rs Refactor where predicates, and reserve for attributes support 2024-11-25 16:38:35 +08:00
item.rs Keep track of parse errors in mods and don't emit resolve errors for paths involving them 2024-12-10 18:17:24 +00:00
mod.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
nonterminal.rs refactor pat parser method names/doc-comments to agree with RFC 3637 2024-11-24 18:08:20 +01:00
pat.rs Keep track of patterns that could have introduced a binding, but didn't 2024-12-13 21:51:33 +00:00
path.rs parse guard patterns 2024-11-24 19:42:33 +01:00
stmt.rs Eliminate precedence arithmetic from rustc_parse 2024-11-30 17:53:39 -08:00
tests.rs allow symbol_intern_string_literal lint in test modules 2024-12-11 20:38:55 +03:00
ty.rs Add tests 2024-12-12 16:29:40 +00:00