os-rust/compiler/rustc_resolve/src
Matthias Krüger f044c6c86c
Rollup merge of #92237 - compiler-errors:issue-92100, r=cjgillot
Visit expressions in-order when resolving pattern bindings

[edited:] Visit the pattern's sub-expressions before defining any bindings.

Otherwise, we might get into a case where a Lit/Range expression in a pattern has a qpath pointing to a Ident pattern that is defined after it, causing an ICE when lowering to HIR. I have a more detailed explanation in the issue linked.

Fixes #92100
2021-12-29 10:17:10 +01:00
..
late Tighten span when suggesting lifetime on path 2021-12-27 23:34:52 -08:00
build_reduced_graph.rs rustc_metadata: Merge get_ctor_def_id and get_ctor_kind 2021-12-22 11:05:54 +08:00
check_unused.rs suggest adding a #[cfg(test)] to test modules 2021-12-16 11:48:58 +09:00
def_collector.rs hir: Do not introduce dummy type names for extern blocks in def paths 2021-12-18 16:30:17 +08:00
diagnostics.rs Remove unnecessary sigils around Ident::as_str() calls. 2021-12-15 17:32:42 +11:00
imports.rs Improve suggestion for extern crate self error message 2021-12-01 21:59:54 +00:00
late.rs Visit patterns' literal expressions before binding new idents 2021-12-27 12:20:13 -08:00
lib.rs resolve: Minor miscellaneous cleanups from #89059 2021-12-21 20:26:41 +08:00
macros.rs Remove unnecessary sigils around Ident::as_str() calls. 2021-12-15 17:32:42 +11:00