mir_build: Rename lower_let_expr to lower_fallible_let, and clarify - #162468
Merged
Conversation
Collaborator
|
Some changes occurred in match lowering cc @Nadrieril |
Collaborator
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
r? me |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 8, 2026
…uwer Rollup of 12 pull requests Successful merges: - #162462 (Fix unsoundness in `VecDeque::from_iter(vec::IntoIter)`) - #162468 (mir_build: Rename `lower_let_expr` to `lower_fallible_let`, and clarify) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #161932 (Only check `#[allow(dead_code)]` on the trait) - #162236 (Call renumberMetadataForAssembly() in LLVMRustPrintModule()) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162451 (Add regression test for item-local diagnostic attribute lint levels) - #162455 (Update codegen-llvm/inline-debuginfo.rs for distinct DILocation) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 8, 2026
Rollup merge of #162468 - Zalathar:fallible-let, r=dianne mir_build: Rename `lower_let_expr` to `lower_fallible_let`, and clarify Calling this method `lower_let_expr` is misleading, as it is also used for lowering let-else statements, which don't contain a `thir::ExprKind::Let`. This PR also: - Rewords some related comments. - Renames the method's `expr` parameter to the less-misleading `scrutinee_id`, since this parameter is the RHS expression being inspected. - Reorders the `pat` and `scrutinee_id` parameters to match their order in normal Rust syntax. - Renames the success/failure blocks to `true_block` and `false_block`, to match the convention used by #161861. There should be no change to compiler behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calling this method
lower_let_expris misleading, as it is also used for lowering let-else statements, which don't contain athir::ExprKind::Let.This PR also:
exprparameter to the less-misleadingscrutinee_id, since this parameter is the RHS expression being inspected.patandscrutinee_idparameters to match their order in normal Rust syntax.true_blockandfalse_block, to match the convention used by mir_build: Clarify parts of if-condition lowering #161861.There should be no change to compiler behaviour.