Skip to content

Use correct typing mode in mir building for the next solver#158478

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:rigid-alias-ice
Jul 7, 2026
Merged

Use correct typing mode in mir building for the next solver#158478
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:rigid-alias-ice

Conversation

@adwinwhite

@adwinwhite adwinwhite commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Previously, we used typing env non_body_analysis when building MIR body.
This is wrong because we're in a body and should reveal opaque types defined in this scope.

Fixes #158439
Fixes #158429

r? lcnr or anyone familiar with typing modes.

@rustbot

rustbot commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 27, 2026
@lcnr

lcnr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 180e599 has been approved by lcnr

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 6. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 Jul 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 6, 2026
Use correct typing mode in mir building for the next solver

Previously, we used typing env `non_body_analysis`  when building MIR body.
This is wrong because we're in a body and should reveal opaque types defined in this scope.

Fixes rust-lang#158439
Fixes rust-lang#158429

r? lcnr or anyone familiar with typing modes.
rust-bors Bot pushed a commit that referenced this pull request Jul 7, 2026
Rollup of 13 pull requests

Successful merges:

 - #158478 (Use correct typing mode in mir building for the next solver)
 - #158796 (Distinguish null reference production from null pointer dereference in UB checks)
 - #158821 (add regression test for late-bound type method probe ICE)
 - #158245 (Update the rustc_perf submodule)
 - #158346 (Prevent rustdoc auto-trait ICEs with `-Znext-solver=globally`)
 - #158536 (Instatiate binder instead of skipping when suggesting function arg error)
 - #158553 (Avoid infinite recursion when trying to build valtrees for self-referential consts)
 - #158679 (Document blocking guarantees for `std::sync`)
 - #158826 (Reorganize `tests/ui/issues` [19/N])
 - #158860 (Delete `impl_def_id` field from `ImplHeader`)
 - #158867 (rewrite `Align::max_for_target` in a more obvious way)
 - #158878 (borrowck: Inline `free_region_constraint_info()` to simplify the code)
 - #158881 (Update mdbook to 0.5.4)
@rust-bors rust-bors Bot merged commit 61ff1d7 into rust-lang:main Jul 7, 2026
13 checks passed
rust-timer added a commit that referenced this pull request Jul 7, 2026
Rollup merge of #158478 - adwinwhite:rigid-alias-ice, r=lcnr

Use correct typing mode in mir building for the next solver

Previously, we used typing env `non_body_analysis`  when building MIR body.
This is wrong because we're in a body and should reveal opaque types defined in this scope.

Fixes #158439
Fixes #158429

r? lcnr or anyone familiar with typing modes.
@rustbot rustbot added this to the 1.99.0 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: !self.type_checker.infcx.next_trait_solver() [ICE]: Unexpected type for constructor

3 participants