Skip to content

Do not increase depth when evaluating nested goals of NormalizesTo#157718

Open
ShoyuVanilla wants to merge 1 commit into
rust-lang:mainfrom
ShoyuVanilla:nested-normalizes-to-without-depth-increase
Open

Do not increase depth when evaluating nested goals of NormalizesTo#157718
ShoyuVanilla wants to merge 1 commit into
rust-lang:mainfrom
ShoyuVanilla:nested-normalizes-to-without-depth-increase

Conversation

@ShoyuVanilla

@ShoyuVanilla ShoyuVanilla commented Jun 10, 2026

Copy link
Copy Markdown
Member

cc #156619 (comment)

Only the last commit is relevant since this is based on #156619

r? lcnr

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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 10, 2026
@rust-bors

This comment has been minimized.

Comment on lines +641 to +645
parent.required_depth =
parent.required_depth.max(match parent.increase_depth_for_nested {
IncreaseDepthForNested::Yes => required_depth_for_nested + 1,
IncreaseDepthForNested::No => required_depth_for_nested,
});

@lcnr lcnr Jun 16, 2026

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.

I've been thinking about about this as this feels brittle. Instead of required_depth, could we change the search graph to track the "min_reached_available_depth" and then required depth is computed as "available_depth - min_reached_available_depth"

that way the way depth is actually tracked doesn't matter anymore

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good to me. I'll try that way 👍

@ShoyuVanilla ShoyuVanilla force-pushed the nested-normalizes-to-without-depth-increase branch from e59d7fa to dc07fda Compare June 17, 2026 15:32
@ShoyuVanilla ShoyuVanilla marked this pull request as ready for review June 17, 2026 15:33
@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 Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants