-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lower patterns before using the bound variable #79362
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Just for clarity, this is not about lowering patterns twice, it is about lowering node ids of patterns twice? I don't quite see how the first and second commit are related to each other, can you explain that a bit? |
Currently, the AST is traversed once to collect and lower all the Pat's node ids. Only later is the AST traversed for the actual lowering of the tree. |
📌 Commit 27c60ba has been approved by |
🌲 The tree is currently closed for pull requests below priority 500, this pull request will be tested once the tree is reopened |
…as-schievink Rollup of 10 pull requests Successful merges: - rust-lang#77758 (suggest turbofish syntax for uninferred const arguments) - rust-lang#79000 (Move lev_distance to rustc_ast, make non-generic) - rust-lang#79362 (Lower patterns before using the bound variable) - rust-lang#79365 (Upgrades the coverage map to Version 4) - rust-lang#79402 (Fix typos) - rust-lang#79412 (Clean up rustdoc tests by removing unnecessary features) - rust-lang#79413 (Fix persisted doctests on Windows / when using workspaces) - rust-lang#79420 (Fixes a word typo in librustdoc) - rust-lang#79421 (Fix docs formatting for `thir::pattern::_match`) - rust-lang#79428 (Fixup compiler docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
So as to avoid having to lower patterns twice.