rust/compiler/rustc_resolve/src
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
..
late Use span_label as it looks better when we show pattern missing binding in order 2024-12-15 22:58:16 +00:00
build_reduced_graph.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
check_unused.rs compiler: use is_none_or where it is clearly better 2024-10-16 23:50:13 -07:00
def_collector.rs Don't make a def id for impl_trait_in_bindings 2024-12-14 18:08:30 +00:00
diagnostics.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
effective_visibilities.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
errors.rs Diagnostic for using macro_rules macro as attr/derive 2024-11-22 16:49:10 +00:00
ident.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
imports.rs Silence use foo::Bar; error if Bar isn't found in foo and foo.rs has parse errors 2024-12-10 18:18:03 +00:00
late.rs Rollup merge of #134284 - estebank:issue-74863, r=lcnr 2024-12-16 20:00:22 +01:00
lib.rs Don't make a def id for impl_trait_in_bindings 2024-12-14 18:08:30 +00:00
macros.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00
rustdoc.rs Add hir::Attribute 2024-12-15 19:18:46 +01:00