Skip to content

Rollup of 5 pull requests#153984

Merged
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
Zalathar:rollup-JpmwnrA
Mar 17, 2026
Merged

Rollup of 5 pull requests#153984
rust-bors[bot] merged 10 commits intorust-lang:mainfrom
Zalathar:rollup-JpmwnrA

Conversation

@Zalathar
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

homersimpsons and others added 10 commits March 13, 2026 17:30
An explicit dep-kind is redundant here. If we want to find the query name, or
check for specific queries, we can inspect the `TaggedQueryKey` instead.

Similarly, in cases where the key is some kind of `DefId`, we can extract it
directly from the `TaggedQueryKey`.
…names, r=mati865

suggest valid features when target feature is invalid

I run into this quite frequently, where I remember some part of a feature name but not the exact name. Now this emits suggestions like

```
error: the feature named `+avx512` is not valid for this target
  --> $DIR/invalid-attribute.rs:127:18
   |
LL | #[target_feature(enable = "+avx512")]
   |                  ^^^^^^^^^^^^^^^^^^ `+avx512` is not valid for this target
   |
   = help: valid names are: `avx512f`, `avx2`, `avx512bw`, `avx512cd`, and `avx512dq` and 74 more
```
…alueFormat-x86_64-gnu, r=marcoieni

Fix LegacyKeyValueFormat report from docker build: x86_64-gnu

Part of rust-lang#152305

r? @marcoieni
…xyUwU

Don't look for non-type-level assoc consts when checking trait object types

On main, when looking for assoc items that weren't specified in a given trait object type (via binding), we comb through all (eligible) assoc consts whether type-level or not even though you're not allowed to bind non-type-level assoc consts.

That's usually fine because traits containing (eligible) non-type-level assoc consts are dyn incompatible, so the trait object type is ~already considered ill-formed. Therefore, in PR rust-lang#150843, I saved myself the extra effort, esp. since back then it was more annoying to check if the const item was declared type-level.

<sub>(More concretely: In bodies, we check for all dyn compatibility violations when lowering the trait object type, so we will bail out early with an error; in contrast, item signatures / non-bodies get wfchecked (`WellFormed` obligation) after lowering which includes dyn compatiblity checking (`DynCompatible` obligation); however to reduce the amount of diags, during lowering if there are any unspecified assoc items, we'll check them for dyn compatibility and bail out early if any of them tests negative.)</sub>

Now, we obviously don't wfcheck the defsite of (eager) type aliases which breaks the assumption that such trait object types get rejected. This led to the regression found in rust-lang#153731: The ill-formed trait object type doesn't get rejected (as is expected) but we now require the single (non-type-level) assoc const to be bound in the dyn-Trait which we didn't do before. The actual error talks about dyn incompatibility due to the aforementioned extra check that's usually there to contain the number of diags.

Fixes [after beta backport] rust-lang#153731.
Remove redundant fields from `QueryStackFrame`

- Follow-up to rust-lang#153867 (comment)
---

Now that QueryStackFrame holds a TaggedQueryKey, it turns out that all of its other fields are redundant and can be removed:

- An explicit dep-kind is redundant here. If we want to find the query name, or check for specific queries, we can inspect the `TaggedQueryKey` instead.
- Similarly, in cases where the key is some kind of `DepId`, we can extract it directly from the `TaggedQueryKey`.

r? nnethercote
…nstraint-suggestion, r=estebank

Suppress self-referential associated type constraint suggestion

Fixes rust-lang#112104

When comparing `Option<&I::Item>` against `Option<I::Item>`, the compiler decomposes the mismatch into `expected = &<I as Iterator>::Item` vs `found = <I as Iterator>::Item`. ARM 2 in `note_and_explain_type_err` matches because `found` is a projection, and would suggest `Item = &<I as Iterator>::Item` — constraining the associated type to something that contains itself.

ARM 1 (`expected_projection`) already guards against this with `found.contains(expected)`. ARM 2 was missing the symmetric check. This adds `expected.contains(found)` to the match guard.

Before:
```rust
help: consider constraining the associated type `<I as Iterator>::Item` to `&<I as Iterator>::Item`
  |
1 | fn foo<I: Iterator<Item = &<I as Iterator>::Item>>(iter: &mut I) {
  |                   +++++++++++++++++++++++++++++++
```

After: bogus suggestion is gone, and the existing `.as_ref()` suggestion from `hir_typeck` still fires correctly.

r? @estebank
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 17, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 17, 2026
@Zalathar
Copy link
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 17, 2026

📌 Commit 66c506d has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot 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 17, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 17, 2026

☀️ Test successful - CI
Approved by: Zalathar
Duration: 3h 7m 46s
Pushing b711f95 to main...

@rust-bors rust-bors bot merged commit b711f95 into rust-lang:main Mar 17, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 17, 2026
@github-actions
Copy link
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 6bdc342 (parent) -> b711f95 (this PR)

Test differences

Show 7 test diffs

Stage 1

  • [ui] tests/ui/associated-types/dont-suggest-self-referential-constraint.rs: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias/lack-of-wfcheck.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/associated-types/dont-suggest-self-referential-constraint.rs: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias/lack-of-wfcheck.rs: [missing] -> pass (J0)

Additionally, 3 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 b711f95f86b6489b91fdc55c876ed5f95a8d4560 --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. dist-aarch64-apple: 1h 44m -> 1h 56m (+12.0%)
  2. dist-i586-gnu-i586-i686-musl: 1h 24m -> 1h 34m (+11.3%)
  3. dist-armhf-linux: 1h 26m -> 1h 34m (+10.2%)
  4. i686-gnu-nopt-1: 2h 27m -> 2h 12m (-9.6%)
  5. dist-x86_64-netbsd: 1h 32m -> 1h 23m (-9.4%)
  6. x86_64-gnu: 2h 10m -> 2h 22m (+9.0%)
  7. dist-apple-various: 1h 37m -> 1h 29m (-8.7%)
  8. i686-msvc-1: 3h 2m -> 2h 47m (-8.2%)
  9. dist-armv7-linux: 1h 26m -> 1h 34m (+8.2%)
  10. x86_64-gnu-miri: 1h 24m -> 1h 31m (+8.1%)
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.

@Zalathar Zalathar deleted the rollup-JpmwnrA branch March 17, 2026 10:55
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b711f95): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

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

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

Max RSS (memory usage)

Results (primary -1.6%, secondary 1.5%)

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

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
-3.4% [-3.7%, -3.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.6% [-3.7%, 2.1%] 3

Cycles

Results (secondary 1.8%)

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

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

Binary size

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

Bootstrap: 481.948s -> 481.409s (-0.11%)
Artifact size: 396.84 MiB -> 394.91 MiB (-0.48%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants