Skip to content

Merge three MaxUniverses into one - #158951

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:unify-max-universe
Jul 10, 2026
Merged

Merge three MaxUniverses into one#158951
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
adwinwhite:unify-max-universe

Conversation

@adwinwhite

Copy link
Copy Markdown
Contributor

We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.

I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia

@rustbot

Copy link
Copy Markdown
Collaborator

changes to the core type system

cc @lcnr

@rustbotrustbot 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 8, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

ShoyuVanilla is currently at their maximum review capacity.
They may take a while to respond.

@adwinwhite

Copy link
Copy Markdown
ContributorAuthor

Wonder whether the resolve_vars_if_possible causes perf regression.
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 8, 2026
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request Jul 8, 2026
@rust-bors

rust-borsBot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: d38b46e (d38b46ead03071b39dde8bbe959f68f764519d6b)
Base parent: 99576cf (99576cf2ebc870c305225e9856b9423228872c56)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d38b46e): 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)

Results (secondary 4.4%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
4.4%[4.4%, 4.4%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Cycles

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

Binary size

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

Bootstrap: 488.508s -> 490.004s (0.31%)
Artifact size: 388.95 MiB -> 388.46 MiB (-0.13%)

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

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

@rust-bors

rust-borsBot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1818498 has been approved by ShoyuVanilla

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
rust-borsBot pushed a commit that referenced this pull request Jul 8, 2026
…uwer
Rollup of 18 pull requests
Successful merges:
- #158871 (add relnotes for 1.97.0)
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158655 (Fix coroutine MIR saved local remapping)
- #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
- #158920 (Update wasm-component-ld to 0.5.26)
- #158926 (wrapping_sh* methods: clarify underspecified reference)
- #158927 (add core test run with `-Zforce-intrinsic-fallback`)
- #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
- #158807 (Add regression test for CString::clone_into unwind safety)
- #158862 (Fix the span for parameter suggestion )
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic)
- #158902 (add codegen test for range length bound propagation)
- #158913 (Update `browser-ui-test` version to `0.24.1`)
- #158935 (std: support real fd methods on Emscripten)
- #158951 (Merge three `MaxUniverse`s into one)
rust-borsBot pushed a commit that referenced this pull request Jul 8, 2026
…uwer
Rollup of 18 pull requests
Successful merges:
- #158871 (add relnotes for 1.97.0)
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158655 (Fix coroutine MIR saved local remapping)
- #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
- #158920 (Update wasm-component-ld to 0.5.26)
- #158926 (wrapping_sh* methods: clarify underspecified reference)
- #158927 (add core test run with `-Zforce-intrinsic-fallback`)
- #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
- #158807 (Add regression test for CString::clone_into unwind safety)
- #158862 (Fix the span for parameter suggestion )
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic)
- #158902 (add codegen test for range length bound propagation)
- #158913 (Update `browser-ui-test` version to `0.24.1`)
- #158935 (std: support real fd methods on Emscripten)
- #158951 (Merge three `MaxUniverse`s into one)
rust-borsBot pushed a commit that referenced this pull request Jul 8, 2026
…uwer
Rollup of 18 pull requests
Successful merges:
- #158871 (add relnotes for 1.97.0)
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158655 (Fix coroutine MIR saved local remapping)
- #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
- #158920 (Update wasm-component-ld to 0.5.26)
- #158926 (wrapping_sh* methods: clarify underspecified reference)
- #158927 (add core test run with `-Zforce-intrinsic-fallback`)
- #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
- #158807 (Add regression test for CString::clone_into unwind safety)
- #158862 (Fix the span for parameter suggestion )
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic)
- #158902 (add codegen test for range length bound propagation)
- #158913 (Update `browser-ui-test` version to `0.24.1`)
- #158935 (std: support real fd methods on Emscripten)
- #158951 (Merge three `MaxUniverse`s into one)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
rust-borsBot pushed a commit that referenced this pull request Jul 9, 2026
…uwer
Rollup of 17 pull requests
Successful merges:
- #158510 (Enable `static_position_independent_executables` on all gnu and musl targets)
- #158541 (Move `std::io::Write` to `core::io`)
- #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`)
- #155429 (Support `u128`/`i128` c-variadic arguments)
- #156370 (Reject linked dylib EII default overrides)
- #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
- #158535 (Support `#[track_caller]` on EII declarations)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158988 (Redo `TokenStreamIter`)
- #158347 (Improve generic parameters handling for #[diagnostic::on_const])
- #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
- #158739 (view-types: HIR lowering)
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158886 (Add documentation for the `no_std` attribute)
- #158951 (Merge three `MaxUniverse`s into one)
- #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
rust-borsBot pushed a commit that referenced this pull request Jul 9, 2026
…uwer
Rollup of 21 pull requests
Successful merges:
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158510 (Enable `static_position_independent_executables` on all gnu and musl targets)
- #158541 (Move `std::io::Write` to `core::io`)
- #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`)
- #155429 (Support `u128`/`i128` c-variadic arguments)
- #156370 (Reject linked dylib EII default overrides)
- #156508 (Infer all anonymous lifetimes in assoc consts as `'static`)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158859 (Improve `-Zls` diagnostic message on `.rs` files)
- #158988 (Redo `TokenStreamIter`)
- #158347 (Improve generic parameters handling for #[diagnostic::on_const])
- #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
- #158739 (view-types: HIR lowering)
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158886 (Add documentation for the `no_std` attribute)
- #158940 (Implement feature `char_to_u32`)
- #158951 (Merge three `MaxUniverse`s into one)
- #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
- #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes)
- #159005 (Use `as_lang_item` instead of repeatedly matching)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
rust-borsBot pushed a commit that referenced this pull request Jul 9, 2026
…uwer
Rollup of 24 pull requests
Successful merges:
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158510 (Enable `static_position_independent_executables` on all gnu and musl targets)
- #158541 (Move `std::io::Write` to `core::io`)
- #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`)
- #156027 (Consider captured regions for opaque type region liveness.)
- #156370 (Reject linked dylib EII default overrides)
- #156508 (Infer all anonymous lifetimes in assoc consts as `'static`)
- #157561 (rustdoc: do not include extra stuff in span)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158859 (Improve `-Zls` diagnostic message on `.rs` files)
- #158988 (Redo `TokenStreamIter`)
- #158347 (Improve generic parameters handling for #[diagnostic::on_const])
- #158384 (Allow BackwardIncompatibleDropHint in polonius legacy)
- #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
- #158739 (view-types: HIR lowering)
- #158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent)
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158886 (Add documentation for the `no_std` attribute)
- #158940 (Implement feature `char_to_u32`)
- #158951 (Merge three `MaxUniverse`s into one)
- #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
- #158995 (Use REST API in linkchecker script)
- #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 9, 2026
…hoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
This was referenced Jul 9, 2026
rust-borsBot pushed a commit that referenced this pull request Jul 10, 2026
Rollup of 24 pull requests
Successful merges:
- #150946 (intrinsics: Add a fallback for non-const libm float functions)
- #158541 (Move `std::io::Write` to `core::io`)
- #156027 (Consider captured regions for opaque type region liveness.)
- #156370 (Reject linked dylib EII default overrides)
- #156508 (Infer all anonymous lifetimes in assoc consts as `'static`)
- #157561 (rustdoc: do not include extra stuff in span)
- #158617 (allow mGCA const arguments to fall back to anon consts)
- #158645 (Fix splat ICEs and ban it in closures)
- #158859 (Improve `-Zls` diagnostic message on `.rs` files)
- #158988 (Redo `TokenStreamIter`)
- #158347 (Improve generic parameters handling for #[diagnostic::on_const])
- #158384 (Allow BackwardIncompatibleDropHint in polonius legacy)
- #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
- #158739 (view-types: HIR lowering)
- #158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent)
- #158883 (tests: fix enum-match.rs to handle LLVM 23)
- #158886 (Add documentation for the `no_std` attribute)
- #158940 (Implement feature `char_to_u32`)
- #158951 (Merge three `MaxUniverse`s into one)
- #158960 (Fix bootstrap submodule path prefix matching)
- #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
- #158995 (Use REST API in linkchecker script)
- #158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes)
- #159036 (bootstrap: expand '@argfile' arguments to rustc shim)
@rust-bors
rust-borsBot merged commit 9a91b8f into rust-lang:mainJul 10, 2026
14 checks passed
@rustbotrustbot added this to the 1.99.0 milestone Jul 10, 2026
rust-timer added a commit that referenced this pull request Jul 10, 2026
Rollup merge of #158951 - adwinwhite:unify-max-universe, r=ShoyuVanilla
Merge three `MaxUniverse`s into one
We have three similar visitors to find the max universe of a value. They differ only in whether they consider infers, placeholders or both.
I think this is a small refactor without any behavior impact.
r? @ShoyuVanilla or @khyperia
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rust-timer build d53d381

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d53d381): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@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.

meanrangecount
Regressions ❌
(primary)
0.4%[0.3%, 0.4%]2
Regressions ❌
(secondary)
0.1%[0.0%, 0.2%]9
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.1%[-0.1%, -0.0%]3
All ❌✅ (primary)0.4%[0.3%, 0.4%]2

Max RSS (memory usage)

Results (primary -0.7%, secondary -1.8%)

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

meanrangecount
Regressions ❌
(primary)
2.4%[2.4%, 2.4%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-3.7%[-3.7%, -3.7%]1
Improvements ✅
(secondary)
-1.8%[-3.5%, -1.0%]3
All ❌✅ (primary)-0.7%[-3.7%, 2.4%]2

Cycles

Results (secondary 1.2%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
5.8%[2.0%, 14.2%]9
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-3.3%[-9.2%, -1.5%]9
All ❌✅ (primary)--0

Binary size

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

Bootstrap: 490.768s -> 489.423s (-0.27%)
Artifact size: 389.74 MiB -> 389.63 MiB (-0.03%)

@rustbotrustbot added the perf-regression Performance regression. label Jul 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rustbot label: +perf-regression-triaged
Noise

@rustbotrustbot added the perf-regression-triaged The performance regression has been triaged. label Jul 12, 2026
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 24 pull requests
Successful merges:
- rust-lang/rust#150946 (intrinsics: Add a fallback for non-const libm float functions)
- rust-lang/rust#158541 (Move `std::io::Write` to `core::io`)
- rust-lang/rust#156027 (Consider captured regions for opaque type region liveness.)
- rust-lang/rust#156370 (Reject linked dylib EII default overrides)
- rust-lang/rust#156508 (Infer all anonymous lifetimes in assoc consts as `'static`)
- rust-lang/rust#157561 (rustdoc: do not include extra stuff in span)
- rust-lang/rust#158617 (allow mGCA const arguments to fall back to anon consts)
- rust-lang/rust#158645 (Fix splat ICEs and ban it in closures)
- rust-lang/rust#158859 (Improve `-Zls` diagnostic message on `.rs` files)
- rust-lang/rust#158988 (Redo `TokenStreamIter`)
- rust-lang/rust#158347 (Improve generic parameters handling for #[diagnostic::on_const])
- rust-lang/rust#158384 (Allow BackwardIncompatibleDropHint in polonius legacy)
- rust-lang/rust#158722 (delegation: do not always inherit `ConstArgHasType` predicates)
- rust-lang/rust#158739 (view-types: HIR lowering)
- rust-lang/rust#158877 (borrowck: Keep returned `path` from `best_blame_constraint()` consistent)
- rust-lang/rust#158883 (tests: fix enum-match.rs to handle LLVM 23)
- rust-lang/rust#158886 (Add documentation for the `no_std` attribute)
- rust-lang/rust#158940 (Implement feature `char_to_u32`)
- rust-lang/rust#158951 (Merge three `MaxUniverse`s into one)
- rust-lang/rust#158960 (Fix bootstrap submodule path prefix matching)
- rust-lang/rust#158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
- rust-lang/rust#158995 (Use REST API in linkchecker script)
- rust-lang/rust#158996 ([compiler] Implement `PartialOrd` via `Ord` for `Span` and newtype_indexes)
- rust-lang/rust#159036 (bootstrap: expand '@argfile' arguments to rustc shim)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@adwinwhite@rustbot@rust-timer@JonathanBrouwer@ShoyuVanilla