Skip to content

mir_build: Clarify some code for lowering hir::PatExpr to THIR #137028

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Feb 15, 2025

Conversation

Zalathar
Copy link
Contributor

A few loosely-related improvements to the code that lowers certain parts of HIR patterns to THIR.

I was originally deferring this until after #136529, but that PR probably won't happen, whereas these changes should hopefully be uncontroversial.

r? Nadrieril or reroll

This matches the HIR changes in rust-lang#134228, which introduced `PatExpr` to hold the
subset of "expressions" that can appear in a pattern.
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2025

Some changes occurred in match checking

cc @Nadrieril

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 14, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@compiler-errors
Copy link
Member

r? compiler-errors @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 14, 2025

📌 Commit 92fc085 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 14, 2025
…-errors

mir_build: Clarify some code for lowering `hir::PatExpr` to THIR

A few loosely-related improvements to the code that lowers certain parts of HIR patterns to THIR.

I was originally deferring this until after rust-lang#136529, but that PR probably won't happen, whereas these changes should hopefully be uncontroversial.

r? Nadrieril or reroll
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang#133312 (triagebot: automatically add more rustdoc related labels)
 - rust-lang#134016 (Stabilize `const_is_char_boundary` and `const_str_split_at`.)
 - rust-lang#135813 (CI: split i686-mingw job to three free runners)
 - rust-lang#136879 (Add safe new() to NotAllOnes)
 - rust-lang#136971 (Add a new check-pass UI test for returning `impl Fn(T) -> impl Trait`)
 - rust-lang#136983 (Prepare standard library for Rust 2024 migration)
 - rust-lang#137002 (Fix early lint check desc in query)
 - rust-lang#137006 (borrowck diagnostics cleanup: remove an unused and a barely-used field)
 - rust-lang#137026 (Stabilize (and const-stabilize) `integer_sign_cast`)
 - rust-lang#137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 - rust-lang#137032 (Decode metadata buffer in one go)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#135687 (re-export `FromCoroutine` from `core::iter`)
 - rust-lang#135813 (CI: split i686-mingw job to three free runners)
 - rust-lang#136749 (Implement Extend<AsciiChar> for String)
 - rust-lang#136879 (Add safe new() to NotAllOnes)
 - rust-lang#136978 (Windows: Update generated bindings)
 - rust-lang#137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 - rust-lang#137029 (Remove unnecessary check code in unused_delims)
 - rust-lang#137056 (made check_argument_compat public for use in miri)
 - rust-lang#137062 (Forward all default methods for I/O impls)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c133123 into rust-lang:master Feb 15, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Rollup merge of rust-lang#137028 - Zalathar:thir-pat-expr, r=compiler-errors

mir_build: Clarify some code for lowering `hir::PatExpr` to THIR

A few loosely-related improvements to the code that lowers certain parts of HIR patterns to THIR.

I was originally deferring this until after rust-lang#136529, but that PR probably won't happen, whereas these changes should hopefully be uncontroversial.

r? Nadrieril or reroll
@Zalathar Zalathar deleted the thir-pat-expr branch February 15, 2025 11:37
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#135687 (re-export `FromCoroutine` from `core::iter`)
 - rust-lang#135813 (CI: split i686-mingw job to three free runners)
 - rust-lang#136749 (Implement Extend<AsciiChar> for String)
 - rust-lang#136879 (Add safe new() to NotAllOnes)
 - rust-lang#136978 (Windows: Update generated bindings)
 - rust-lang#137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 - rust-lang#137029 (Remove unnecessary check code in unused_delims)
 - rust-lang#137056 (made check_argument_compat public for use in miri)
 - rust-lang#137062 (Forward all default methods for I/O impls)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#135687 (re-export `FromCoroutine` from `core::iter`)
 - rust-lang#135813 (CI: split i686-mingw job to three free runners)
 - rust-lang#136749 (Implement Extend<AsciiChar> for String)
 - rust-lang#136879 (Add safe new() to NotAllOnes)
 - rust-lang#136978 (Windows: Update generated bindings)
 - rust-lang#137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 - rust-lang#137029 (Remove unnecessary check code in unused_delims)
 - rust-lang#137056 (made check_argument_compat public for use in miri)
 - rust-lang#137062 (Forward all default methods for I/O impls)

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants