rust/compiler/rustc_resolve
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
..
src Rollup merge of #92237 - compiler-errors:issue-92100, r=cjgillot 2021-12-29 10:17:10 +01:00
Cargo.toml