Skip to content

Rename various resolving functions for consistency, and document them - #162126

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
jdonszelmann:rename-resolving
Sep 11, 2026
Merged

Rename various resolving functions for consistency, and document them#162126
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
jdonszelmann:rename-resolving

Conversation

@jdonszelmann

@jdonszelmann jdonszelmann commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

View all comments

r? @lcnr or anyone in @rust-lang/initiative-trait-system-refactor

This is all changes from https://github.com/rust-lang/rust/pull/160913/changes that are just renames. Updating that PR to be just the logic changes

All interesting changes happened in rustc_infer/src/infer/mod.rs across all commits. Everything else is renames propagating through other files.

The functions are now called:

before after note
shallow_resolve_* (unchanged) shallow_resolve_* Now with newly added docs.
resolve_vars_if_possible_* deeply_resolve_ignoring_regions_*
eager_resolve_vars deeply_resolve_via_unification_table moved onto the InferCtxtLike as an inherent method with default body.
fully_resolve deeply_resolve_via_region_graph Resolves with regions and asserts that all variables are resolved at the end. Note, we only use this function 3x so the long name is ok, it shouldn't be your go-to anyway.
opportunistic_resolve_var gone, same as shalllow_resolve now that we resolve to roots

Note

I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.

@rustbot

rustbot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

changes to inspect_obligations.rs

cc @lcnr

changes to the core type system

cc @lcnr

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Some changes occurred in need_type_info.rs

cc @lcnr

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2026
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 1, 2026
@jdonszelmann jdonszelmann changed the title Rename various resolving functions Rename various resolving functions for consistencym and document them Sep 1, 2026
@jdonszelmann jdonszelmann changed the title Rename various resolving functions for consistencym and document them Rename various resolving functions for consistency, and document them Sep 1, 2026
@BoxyUwU

BoxyUwU commented Sep 1, 2026

Copy link
Copy Markdown
Member

bikeshed: fully_resolve to deeply_resolve_and_assert_blah or sth? it feels odd to me that there wouldnt be a naming similarity between fully_resolve and all the other methods

@jdonszelmann

Copy link
Copy Markdown
Contributor Author

hm, I do like that, lemme change that @BoxyUwU :)

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_infer/src/infer/outlives/obligations.rs

@BoxyUwU BoxyUwU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems reasonable enough 🤔 It feels a little unfortunate that we lose "var" being in the name of resolve_vars_if_possible. It's also a little unfortunate that deeply_resolve has naming similarities with deeply_normalize which errors if it can't normalize sth, whereas deeply_normalize is fine if it can't resolve something 🤔

I do like the new names more though since they feel more internally consistent with eachother

View changes since this review

@BoxyUwU BoxyUwU self-assigned this Sep 2, 2026
@rust-bors

This comment has been minimized.

@BoxyUwU

BoxyUwU commented Sep 8, 2026

Copy link
Copy Markdown
Member

@rustbot author (conflicts)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 8, 2026
@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

This comment has been minimized.

@jdonszelmann

Copy link
Copy Markdown
Contributor Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 8, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 11, 2026
@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#162629), which was unapproved.

View changes since this unapproval

@jdonszelmann

Copy link
Copy Markdown
Contributor Author

ugh, I think this should fix it. @bors r=lcnr, BoxyUwU

@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f4fd639 has been approved by lcnr,

It is now in the queue for this repository.

⚠️ The following reviewer(s) could not be found: ``

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 11, 2026
@jdonszelmann

Copy link
Copy Markdown
Contributor Author

@bors r-

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 11, 2026
@jdonszelmann

Copy link
Copy Markdown
Contributor Author

@bors r=lcnr,BoxyUwU

@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 11, 2026
@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f4fd639 has been approved by lcnr,BoxyUwU

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 11, 2026
…cnr,BoxyUwU

Rename various resolving functions for consistency, and document them

r? @lcnr or anyone in @rust-lang/initiative-trait-system-refactor

This is all changes from https://github.com/rust-lang/rust/pull/160913/changes that are *just* renames. Updating that PR to be *just* the logic changes

All interesting changes happened in `rustc_infer/src/infer/mod.rs` across all commits. Everything else is renames propagating through other files.

The functions are now called:

| before    |   after  | note |
|---|---|---|
| `shallow_resolve_*` | (unchanged) `shallow_resolve_*` | Now with newly added docs. |
| `resolve_vars_if_possible_*` | `deeply_resolve_ignoring_regions_*` | |
| `eager_resolve_vars` | `deeply_resolve_via_unification_table` | moved onto the `InferCtxtLike` as an inherent method with default body. |
| `fully_resolve` |`deeply_resolve_via_region_graph` | Resolves *with* regions and asserts that all variables are resolved at the end. Note, we only use this function 3x so the long name is ok, it shouldn't be your go-to anyway. |
| `opportunistic_resolve_var` | | gone, same as `shalllow_resolve` now that we resolve to roots |

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #162126 (Rename various resolving functions for consistency, and document them)
 - #160681 (Respect `--all-targets` flag when checking the compiler)
 - #162580 (Parallel frontend: reproducible coroutine_by_move_body_def_id )
 - #162614 (add regression test for RPITIT fulfillment error)
 - #162626 (Move `riscv64im-unknown-none-elf` to Tier 3 table)
@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit f4fd639 with merge 9d0a292...

Workflow: https://github.com/rust-lang/rust/actions/runs/34615212472

rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
Rename various resolving functions for consistency, and document them



r? @lcnr or anyone in @rust-lang/initiative-trait-system-refactor 

This is all changes from https://github.com/rust-lang/rust/pull/160913/changes that are *just* renames. Updating that PR to be *just* the logic changes

All interesting changes happened in `rustc_infer/src/infer/mod.rs` across all commits. Everything else is renames propagating through other files.


The functions are now called:

| before    |   after  | note |
|---|---|---|
| `shallow_resolve_*` | (unchanged) `shallow_resolve_*` | Now with newly added docs. |
| `resolve_vars_if_possible_*` | `deeply_resolve_ignoring_regions_*` | |
| `eager_resolve_vars` | `deeply_resolve_via_unification_table` | moved onto the `InferCtxtLike` as an inherent method with default body. |
| `fully_resolve` |`deeply_resolve_via_region_graph` | Resolves *with* regions and asserts that all variables are resolved at the end. Note, we only use this function 3x so the long name is ok, it shouldn't be your go-to anyway. |
| `opportunistic_resolve_var` | | gone, same as `shalllow_resolve` now that we resolve to roots |

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors yield
Yielding to enclosing rollup

@rust-bors

rust-bors Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #162640.

rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #162126 (Rename various resolving functions for consistency, and document them)
 - #160681 (Respect `--all-targets` flag when checking the compiler)
 - #162580 (Parallel frontend: reproducible coroutine_by_move_body_def_id )
 - #162614 (add regression test for RPITIT fulfillment error)
 - #162626 (Move `riscv64im-unknown-none-elf` to Tier 3 table)
@rust-bors
rust-bors Bot merged commit e6b92f8 into rust-lang:main Sep 11, 2026
13 of 14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 11, 2026
Rollup merge of #162126 - jdonszelmann:rename-resolving, r=lcnr,BoxyUwU

Rename various resolving functions for consistency, and document them

r? @lcnr or anyone in @rust-lang/initiative-trait-system-refactor

This is all changes from https://github.com/rust-lang/rust/pull/160913/changes that are *just* renames. Updating that PR to be *just* the logic changes

All interesting changes happened in `rustc_infer/src/infer/mod.rs` across all commits. Everything else is renames propagating through other files.

The functions are now called:

| before    |   after  | note |
|---|---|---|
| `shallow_resolve_*` | (unchanged) `shallow_resolve_*` | Now with newly added docs. |
| `resolve_vars_if_possible_*` | `deeply_resolve_ignoring_regions_*` | |
| `eager_resolve_vars` | `deeply_resolve_via_unification_table` | moved onto the `InferCtxtLike` as an inherent method with default body. |
| `fully_resolve` |`deeply_resolve_via_region_graph` | Resolves *with* regions and asserts that all variables are resolved at the end. Note, we only use this function 3x so the long name is ok, it shouldn't be your go-to anyway. |
| `opportunistic_resolve_var` | | gone, same as `shalllow_resolve` now that we resolve to roots |

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
@rustbot rustbot added this to the 1.100.0 milestone Sep 11, 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. 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.

6 participants