Skip to content

Increase depth for float infer var fallback hack#159646

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:fix-f16-hack
Jul 22, 2026
Merged

Increase depth for float infer var fallback hack#159646
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:fix-f16-hack

Conversation

@adwinwhite

@adwinwhite adwinwhite commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

View all comments

Fixes rust-lang/trait-system-refactor-initiative#280

With this, the fallback hack works again in bevy-shaders@0.1.0 and bevy-multi@0.1.0.

Also added perf optimizations to the proof tree visitor.

r? @ShoyuVanilla
cc @lcnr

@rustbot

rustbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

changes to inspect_obligations.rs

cc @lcnr

@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 Jul 21, 2026
// Avoid hang from exponentially growing proof trees (see `cycle-modulo-ambig-aliases.rs`).
// 3 is more than enough for all occurrences in practice (a.k.a. `Into`).
InspectConfig { max_depth: 3 }
// 4 is more than enough for all occurrences in practice (a.k.a. `Into`).

@lcnr lcnr Jul 21, 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.

saying "more than enough" while it's really exactly enough feels questionable 🤣

NestedObligationsForSelfTy uses max_depth: 5 🤔 maybe have a free constant MAX_DEPTH_FOR_OBLIGATIONS_VISITORS in this module. I would use the same comment as in that other visitor/put the comment on that constant

View changes since the review

@lcnr lcnr left a comment

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.

we can also use pending_obligations_potentially_referencing_sub_root before visiting any of them

View changes since this review

@lcnr

lcnr commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

please start a perf run after the nits :>

@rustbot

rustbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the core trait solver

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

@adwinwhite

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 22, 2026
rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
Increase depth for float infer var fallback hack
@adwinwhite

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@adwinwhite

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@adwinwhite

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
Increase depth for float infer var fallback hack
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 99b59f8 (99b59f8fba71d921443a3eabc97ef72f063bbcf9)
Base parent: b9ee8d8 (b9ee8d8bcb1e4c7905a183a37e6d984c4b9a8468)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (99b59f8): comparison URL.

Overall result: no relevant changes - no action needed

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

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

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

Cycles

Results (secondary -5.0%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.0% [-5.0%, -5.0%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 486.905s -> 486.578s (-0.07%)
Artifact size: 387.85 MiB -> 387.87 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 22, 2026
@lcnr

lcnr commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 490b344 has been approved by lcnr

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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2026

@ShoyuVanilla ShoyuVanilla 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.

Though I'm late for the party but looks good to me as well 😅

View changes since this review

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 22, 2026
Increase depth for float infer var fallback hack

Fixes rust-lang/trait-system-refactor-initiative#280

With this, the fallback hack works again in `bevy-shaders@0.1.0` and `bevy-multi@0.1.0`.

Also added perf optimizations to the proof tree visitor.

r? @ShoyuVanilla
cc @lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 22, 2026
Increase depth for float infer var fallback hack

Fixes rust-lang/trait-system-refactor-initiative#280

With this, the fallback hack works again in `bevy-shaders@0.1.0` and `bevy-multi@0.1.0`.

Also added perf optimizations to the proof tree visitor.

r? @ShoyuVanilla
cc @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159712 (Subtree sync for rustc_codegen_cranelift)
 - #155697 (Stabilize c-variadic function definitions)
 - #159285 (Simplify `apply_effects_in_range`)
 - #159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes)
 - #159659 (Move `Limit` out of `rustc_hir`)
 - #159451 (Remove config cloning in compiletest)
 - #159646 (Increase depth for float infer var fallback hack)
 - #159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 22, 2026
Increase depth for float infer var fallback hack

Fixes rust-lang/trait-system-refactor-initiative#280

With this, the fallback hack works again in `bevy-shaders@0.1.0` and `bevy-multi@0.1.0`.

Also added perf optimizations to the proof tree visitor.

r? @ShoyuVanilla
cc @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #159712 (Subtree sync for rustc_codegen_cranelift)
 - #155697 (Stabilize c-variadic function definitions)
 - #159285 (Simplify `apply_effects_in_range`)
 - #159596 (unify the AST repr of type const and const RHS)
 - #159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes)
 - #159659 (Move `Limit` out of `rustc_hir`)
 - #159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern)
 - #158479 (Reject static item as direct const generic arg)
 - #158738 (next_trait_solver: Recover from GCE const exprs)
 - #159451 (Remove config cloning in compiletest)
 - #159646 (Increase depth for float infer var fallback hack)
 - #159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #159712 (Subtree sync for rustc_codegen_cranelift)
 - #155697 (Stabilize c-variadic function definitions)
 - #159285 (Simplify `apply_effects_in_range`)
 - #159596 (unify the AST repr of type const and const RHS)
 - #159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes)
 - #159659 (Move `Limit` out of `rustc_hir`)
 - #159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern)
 - #158738 (next_trait_solver: Recover from GCE const exprs)
 - #159451 (Remove config cloning in compiletest)
 - #159646 (Increase depth for float infer var fallback hack)
 - #159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
@rust-bors
rust-bors Bot merged commit 0159af3 into rust-lang:main Jul 22, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 22, 2026
rust-timer added a commit that referenced this pull request Jul 22, 2026
Rollup merge of #159646 - adwinwhite:fix-f16-hack, r=lcnr

Increase depth for float infer var fallback hack

Fixes rust-lang/trait-system-refactor-initiative#280

With this, the fallback hack works again in `bevy-shaders@0.1.0` and `bevy-multi@0.1.0`.

Also added perf optimizations to the proof tree visitor.

r? @ShoyuVanilla
cc @lcnr
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Jul 23, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#159712 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#155697 (Stabilize c-variadic function definitions)
 - rust-lang/rust#159285 (Simplify `apply_effects_in_range`)
 - rust-lang/rust#159596 (unify the AST repr of type const and const RHS)
 - rust-lang/rust#159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes)
 - rust-lang/rust#159659 (Move `Limit` out of `rustc_hir`)
 - rust-lang/rust#159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern)
 - rust-lang/rust#158738 (next_trait_solver: Recover from GCE const exprs)
 - rust-lang/rust#159451 (Remove config cloning in compiletest)
 - rust-lang/rust#159646 (Increase depth for float infer var fallback hack)
 - rust-lang/rust#159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
moabo3li pushed a commit to moabo3li/miri that referenced this pull request Jul 23, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#159712 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#155697 (Stabilize c-variadic function definitions)
 - rust-lang/rust#159285 (Simplify `apply_effects_in_range`)
 - rust-lang/rust#159596 (unify the AST repr of type const and const RHS)
 - rust-lang/rust#159607 (test: update riscv32e-registers.rs for LLVM 24 MC diagnostic changes)
 - rust-lang/rust#159659 (Move `Limit` out of `rustc_hir`)
 - rust-lang/rust#159707 (fix error when a dangling ref in a ManuallyDrop is used in a pattern)
 - rust-lang/rust#158738 (next_trait_solver: Recover from GCE const exprs)
 - rust-lang/rust#159451 (Remove config cloning in compiletest)
 - rust-lang/rust#159646 (Increase depth for float infer var fallback hack)
 - rust-lang/rust#159705 (bootstrap: Prefer `cfg!(not(test))` when skipping code paths during unit tests)
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.

float f16 fallback hack is insufficient in next-solver

5 participants