Skip to content

Skip fulfillment when normalization produces no obligations - #165847

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
TaKO8Ki:skip-empty-normalization-fulfillment
Nov 25, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
TaKO8Ki:skip-empty-normalization-fulfillment

Conversation

@TaKO8Ki

@TaKO8Ki TaKO8Ki commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

View all comments

In the next solver, normalization always builds and evaluates a new FulfillmentCtxt afterwards, even when it produced no obligations. This PR returns early in that case.

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 Nov 12, 2026
@TaKO8Ki

TaKO8Ki commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 12, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
… r=<try>

Skip fulfillment when normalization produces no obligations
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: c27d81c (c27d81c57f48e22647bfb2eed42d2ea6c652b730)
Base parent: ee8268e (ee8268e23d0e2e308b52e4f63df69afb69bc61a4)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (c27d81c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@bors rollup=iffy rustc-perf
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.8%, -0.2%] 10
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.7%, secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
1.3% [0.5%, 1.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Cycles

Results (primary -2.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.8% [-4.3%, -3.3%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-4.3%, 2.1%] 7

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 484.606s -> 486.397s (0.37%)
Artifact size: 406.06 MiB -> 405.95 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 12, 2026
@TaKO8Ki

TaKO8Ki commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

The perf run shows up to -0.89% instructions on the -Znext-solver benchmarks and no change elsewhere.

@TaKO8Ki
TaKO8Ki marked this pull request as ready for review November 17, 2026 16:59
@rustbot

rustbot commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the core trait solver

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

@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 Nov 17, 2026

@lcnr lcnr Nov 23, 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.

want to instead make this an else

style nit, otherwise r=me

View changes since the review

@lcnr

lcnr commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@rustbot author

@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 Nov 24, 2026
@TaKO8Ki
TaKO8Ki force-pushed the skip-empty-normalization-fulfillment branch from 530f53e to 120e65c Compare November 24, 2026 17:11
@TaKO8Ki

TaKO8Ki commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

@bors r=lcnr

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 120e65c has been tentatively approved by lcnr

It will be put into the queue for this repository once PR CI succeeds.

@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 Nov 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ulfillment, r=lcnr

Skip fulfillment when normalization produces no obligations

In the next solver, normalization always builds and evaluates a new `FulfillmentCtxt` afterwards, even when it produced no obligations. This PR returns early in that case.

r? lcnr
@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

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

@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 Nov 24, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2026
@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

This PR was contained in a rollup (#166528), which was closed.

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

Rollup of 14 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
@JonathanBrouwer

Copy link
Copy Markdown
Member

Whoops accidentally did "close with comment" rather than "comment"

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors r=lcnr

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 120e65c has been tentatively approved by lcnr

It will be put into the queue for this repository once PR CI succeeds.

@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. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors r=lcnr force

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 120e65c has been approved by lcnr

It is now in the queue for this repository.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…ulfillment, r=lcnr

Skip fulfillment when normalization produces no obligations

In the next solver, normalization always builds and evaluates a new `FulfillmentCtxt` afterwards, even when it produced no obligations. This PR returns early in that case.

r? lcnr
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
@rust-bors rust-bors Bot mentioned this pull request Nov 24, 2026
@rust-bors

rust-bors Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Testing commit 120e65c with merge 6461011...

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

rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
… r=lcnr

Skip fulfillment when normalization produces no obligations





In the next solver, normalization always builds and evaluates a new `FulfillmentCtxt` afterwards, even when it produced no obligations. This PR returns early in that case.

r? lcnr
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors yield

(to enclosing rollup)

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

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

rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup of 15 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166429 (1.100.1 relnotes)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
 - #166521 (Not-so-pointless change to hashbrown subtree)
rust-bors Bot pushed a commit that referenced this pull request Nov 25, 2026
Rollup merge of #165847 - TaKO8Ki:skip-empty-normalization-fulfillment, r=lcnr

Skip fulfillment when normalization produces no obligations

In the next solver, normalization always builds and evaluates a new `FulfillmentCtxt` afterwards, even when it produced no obligations. This PR returns early in that case.

r? lcnr
@rust-bors
rust-bors Bot merged commit ab1360d into rust-lang:main Nov 25, 2026
28 of 29 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 25, 2026
clarfonthey pushed a commit to clarfonthey/hashbrown that referenced this pull request Nov 25, 2026
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations)
 - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions)
 - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals)
 - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds)
 - rust-lang/rust#166500 (Fix float zero patterns after a failed guard)
 - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge)
 - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity)
 - rust-lang/rust#166429 (1.100.1 relnotes)
 - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress)
 - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets)
 - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - rust-lang/rust#166511 (Documentation: clarify Termination::report doc)
 - rust-lang/rust#166514 (coroutine: unify the word choice)
 - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
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.

6 participants