Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Rollup of 12 pull requests by JonathanBrouwer · Pull Request #153741 · rust-lang/rust · GitHub
Skip to content

Rollup of 12 pull requests - #153741

Merged
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB
Mar 12, 2026
Merged

Rollup of 12 pull requests#153741
rust-bors[bot] merged 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xwr7mEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

oli-obkand others added 28 commits March 7, 2026 15:36
There is a bunch of complexity supporting the "cannot check whether the
hidden type of opaque type satisfies auto traits" error that shows up in
`tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that
shows up in a single test. If we are willing to downgrade that error
message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown`
variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent
with other uses of `for_each_query_vtable!`.
When a delegation path like `reuse Trait::<> as bar4` has a child segment
that resolves to a trait instead of a function, the compiler would ICE
because `lower_generic_args_of_path` asserts that `self_ty` is `Some`
when `has_self` is true and `parent` is `None`.
Fix this by filtering out non-function child segments early using
`.filter()` in the method chain, so that when the child segment resolves
to a trait (error recovery for E0423), we skip generic args computation
entirely and return an empty list via `unwrap_or_default()`.
Also make `get_segment` return `Option` by using `opt_def_id()` instead
of `def_id()` to gracefully handle unresolved segments.
…range_end_end, r=davidtwco
Stop using rustc_layout_scalar_valid_range_* in rustc
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152569)*
Another step towards rust-lang#135996
Required some manual impls, but we already do many manual impls for the newtype_index types, so it's not really a new maintenance burden.
…petrochenkov
Fix ICE in fn_delegation when child segment resolves to a trait
Fixesrust-lang#153420
When a delegation path like `reuse Trait::<> as bar4` has only one segment resolving to a trait (not a function), the child args processing in `get_delegation_user_specified_args` called `lower_generic_args_of_path` with `self_ty = None`. Since the trait's generics have `has_self = true`, this triggered
`assert!(self_ty.is_some())`.
Fix by computing and providing `self_ty` when the child segment's `def_id` has `has_self`. In valid delegation code the child segment always resolves to a function, so this only affects error recovery.
…mann
Avoid ICE when an EII declaration conflicts with a constructor
Fixesrust-lang#153502
When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve
the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes
that target is a foreign function and later ICEs while building diagnostics.
This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`.
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following.
- Simplify the `type_of_opaque` return value.
- Remove the `cycle_stash` query modifier.
- Remove the `CyclePlaceholder` type.
- Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant.
- Remove a `FromCycleError` impl.
- Remove `report_opaque_type_auto_trait_leakage`.
- Remove the `StashKey::Cycle` variant.
- Remove the `CycleErrorHandling::Stash` variant.
That's a lot! I think this is a worthwhile trade-off.
r? @oli-obk
…li-obk
interpret: go back to regular string interpolation for error messages
Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts rust-lang#111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR.
The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer.
r? @oli-obkFixesrust-lang#113117Fixesrust-lang#116764Fixesrust-lang#112618
…abels, r=estebank
Unify same-span labels in move error diagnostics
Fixesrust-lang#153506.
When there's a single binding in a move error, we emit "data moved here" and "move occurs because ... does not implement the Copy trait" as two separate labels on the same span. This combines them into one label via a new `TypeNoCopy::LabelMovedHere` variant.
The multi-binding case still uses separate labels + a note since they point at different spans.
cc @estebank
…i865
mir-opt: Drop invalid debuginfos after SingleUseConsts.
Fixesrust-lang#153601.
…cote
Introduce `for_each_query_vtable!` to move more code out of query macros
After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly.
This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this:
```rust
for_each_query_vtable!(ALL, tcx, |query| {
query_key_hash_verify(query, tcx);
});
```
The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt.
Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it:
- The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier.
- The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo.
- For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
miri-test-libstd: use --tests and update some comments
rust-lang#153143 added `./x test --tests` matching `cargo --tests`, which is exactly what Miri wants when testing the standard library. So let's use it for that. We can then also remove a hack in `library/alloctests/benches/vec_deque_append.rs`.
Also update the comment for why the other benchmarks still need to be disabled in Miri, and remove some `cfg_attr` that seem unnecessary since the entire crate that contains them is already disabled in Miri. Those were copied over in rust-lang@b8fa843 -- they used to be needed since benches and tests were in the same crate, but they aren't any more.
…t, r=Kobzol
Make Enzyme has dependent on LLVM hash
This issue was encountered a few times by autodiff contributors.
Closesrust-lang#152969
Just adding the llvm hash here triggered a rebuild of Enzyme locally, but I'll admit I didn't try it with a real llvm submodule update.
r? @Kobzol
remove `.ftl` checks from tidy
These files have been removed following rust-lang/compiler-team#959.
Part of rust-lang#151366.
… r=RalfJung
doc/rustc: clarify how to contact arm-maintainers
Addresses feedback from rust-lang#147268 (comment)
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Mar 11, 2026
@rustbotrustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 11, 2026
@rustbotrustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f3dfb44 has been approved by JonathanBrouwer

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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2026
@rust-bors

rust-borsBot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 10m 54s
Pushing d1ee5e5 to main...

@rust-bors
rust-borsBot merged commit d1ee5e5 into rust-lang:mainMar 12, 2026
12 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3b1b0ef (parent) -> d1ee5e5 (this PR)

Test differences

Show 189 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J1)
  • [mir-opt] tests/mir-opt/debuginfo/single_use_consts.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/reuse-trait-path-with-empty-generics.rs: [missing] -> pass (J3)
  • [ui] tests/ui/eii/duplicate/eii-declaration-conflicts-with-constructor.rs: [missing] -> pass (J4)

Additionally, 182 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1ee5e59a964a419b84b760812a35075034f4861 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h 24m -> 1h 42m (+21.5%)
  2. dist-apple-various: 1h 26m -> 1h 41m (+18.2%)
  3. dist-aarch64-apple: 2h 3m -> 2h 22m (+15.2%)
  4. aarch64-apple: 2h 40m -> 3h 2m (+14.1%)
  5. dist-x86_64-apple: 1h 48m -> 2h 3m (+13.9%)
  6. test-various: 1h 56m -> 2h 8m (+10.6%)
  7. aarch64-gnu-debug: 1h 20m -> 1h 12m (-10.1%)
  8. x86_64-gnu-gcc: 1h 3m -> 1h 9m (+9.7%)
  9. x86_64-gnu-llvm-21-1: 1h 8m -> 1h 15m (+9.3%)
  10. x86_64-gnu: 2h 27m -> 2h 13m (-9.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1ee5e5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.1%[0.1%, 0.2%]4
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]3
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.1%]13
All ❌✅ (primary)0.1%[-0.2%, 0.2%]5

Max RSS (memory usage)

Results (primary 2.2%, secondary 1.0%)

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

meanrangecount
Regressions ❌
(primary)
2.2%[2.0%, 2.3%]3
Regressions ❌
(secondary)
1.0%[1.0%, 1.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.0%, 2.3%]3

Cycles

Results (primary 3.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 491.073s -> 480.488s (-2.16%)
Artifact size: 397.05 MiB -> 394.87 MiB (-0.55%)

@rustbotrustbot added the perf-regression Performance regression. label Mar 12, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

We don't seem to have unrolled builds. At a glance, cachegrind diff of diesel suggests the regression is in trait solving, though it's a bit hard to interpret. If so I'm suspecting #153581 as being the root cause. That cleanup is probably worth the small regression presuming it's the cause, so I'll go ahead and mark as triaged.

42,379,120 PROGRAM TOTALS
--------------------------------------------------------------------------------
-- File:function summary
--------------------------------------------------------------------------------
Ir_________ file:function
< 41,176,790 ???:
-39,438,193 <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}>, <rus>
39,096,269 <core::iter::adapters::map::Map<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>>
25,359,154 <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
12,251,316 <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
4,427,902 <rustc_infer::infer::outlives::env::OutlivesEnvironment as rustc_trait_selection::regions::OutlivesEnvironmentBuildExt>::new_with_implied_bounds_compat::<core::iter::adapters::copied::Copied<indexmap::set::iter::Iter<rustc_middle::ty::Ty>>>
-4,126,847 rustc_hir_analysis::check::wfcheck::check_associated_item
3,727,043 <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
-2,557,434 <hashbrown::raw::RawTable<((usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(usize, rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0}>
2,557,434 <hashbrown::raw::RawTable<((*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint)>>::reserve_rehash::<hashbrown::map::make_hasher<(*const (), rustc_data_structures::stable_hasher::HashingControls), rustc_data_structures::fingerprint::Fingerprint, rustc_hash::FxBuildHasher>::{closure#0>
2,445,145 <rustc_span::span_encoding::Span>::to
-2,383,729 realloc
1,948,086 <rustc_trait_selection::traits::wf::WfPredicates as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty

@Mark-SimulacrumMark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 16, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-xwr7mEB branch August 21, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-tidyArea: The tidy toolmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@JonathanBrouwer@rust-timer@Mark-Simulacrum@rustbot@oli-obk@TaKO8Ki@arferreira@ZuseZ4@dianqk@davidtwco@nnethercote@cyrgani@Zalathar@RalfJung@GokhanKabar