Skip to content

Structurally normalize in range pattern checking in HIR typeck - #140707

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:range-pat-struct-norm
May 9, 2025
Merged

Structurally normalize in range pattern checking in HIR typeck#140707
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:range-pat-struct-norm

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

@rustbotrustbot 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 May 6, 2025
@rust-log-analyzer

This comment has been minimized.

Comment threadcompiler/rustc_hir_typeck/src/pat.rs Outdated
// be peeled to `str` while ty here is still `&str`, if we don't
// err early here, a rather confusing unification error will be
// emitted instead).
let ty = self.structurally_resolve_type(expr.span, ty);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need to do the same in fn calc_adjust_mode given that this also structurally matches on check_pat_expr_unadjusted?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

possibly

@lcnr

lcnr commented May 8, 2025

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented May 8, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 9af6ee5 has been approved by lcnr

It is now in the queue for this repository.

@borsbors 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 May 8, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 8, 2025
…orm, r=lcnr
Structurally normalize in range pattern checking in HIR typeck
Fixesrust-lang/trait-system-refactor-initiative#200
r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2025
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#140095 (Eliminate `word_and_empty` methods.)
- rust-lang#140341 (Clarify black_box warning a bit)
- rust-lang#140684 (Only include `dyn Trait<Assoc = ...>` associated type bounds for `Self: Sized` associated types if they are provided)
- rust-lang#140707 (Structurally normalize in range pattern checking in HIR typeck)
- rust-lang#140716 (Improve `-Zremap-path-scope` tests with dependency)
- rust-lang#140800 (Make `rustdoc-tempdir-removal` run-make tests work on other platforms than linux)
- rust-lang#140802 (Add release notes for 1.87.0)
- rust-lang#140811 (Enable triagebot note functionality for rust-lang/rust)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit f7168af into rust-lang:masterMay 9, 2025
@rustbotrustbot added this to the 1.88.0 milestone May 9, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2025
Rollup merge of rust-lang#140707 - compiler-errors:range-pat-struct-norm, r=lcnr
Structurally normalize in range pattern checking in HIR typeck
Fixesrust-lang/trait-system-refactor-initiative#200
r? lcnr
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

enumoid regression: not structurally normalizing type in hir typeck pattern checking

5 participants

@compiler-errors@rust-log-analyzer@lcnr@bors@rustbot