Skip to content

Rollup of 10 pull requests#157852

Merged
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-DcP4hvf
Jun 13, 2026
Merged

Rollup of 10 pull requests#157852
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-DcP4hvf

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

rohaquinlop and others added 23 commits June 8, 2026 10:12
When #[target_feature(enable = "sse2")] is used on an aarch64
target, the error now includes a note naming the target architecture
where the feature IS valid, e.g.:

  = note: `sse2` is present on the `x86` target architecture.
  Did you mean to compile for that target, or use conditional
  compilation?

Multi-arch features (e.g. aes on arm+aarch64+x86) get the plural
form listing all matching architectures.
This reduces the amount of LLVM IR rustc generates for basically every
use of `fmt::Pointer` by several hundred lines per pointee type. Most of
the gain is from side-stepping a code size issue with the current
implementation of `Formatter::with_field`. But even if those were fixed,
it would still be an improvement:

* The "is it a thin pointer?" check can't be eliminated during codegen,
  so rustc codegens *both* branches for every pointer type and LLVM has
  to clean it up later.
* For wide pointers, the use of `DebugStruct` isn't a *lot* of code, but
  it's still a bit of extra code per wide pointer type that can easily
  be shared across all wide pointer types.
Same as 147495, just keeping it up-to-date.
Improve polymorphization of raw pointer formatting

This reduces the amount of LLVM IR rustc generates for basically every use of `fmt::Pointer` by several hundred lines per pointee type. Most of the gain is from side-stepping a code size issue with the current implementation of `Formatter::with_field`. But even if those were fixed, it would still be an improvement:

* The "is it a thin pointer?" check can't be eliminated during codegen, so rustc codegens *both* branches for every pointer type and LLVM has to clean it up later.
* For wide pointers, the use of `DebugStruct` isn't a *lot* of code, but it's still a bit of extra code per wide pointer type that can easily be shared across all wide pointer types.
…oxyUwU

Remove AnonConstKind::GCA and reject generic anon consts

Previously, a `GCA` type const (`type const FOO<const N: usize>: usize = const { N + 1 };`) was a type-system-transparent type const whose body immediately thunked out to an opaque regular const (albeit an anon const). The fact that there was a transparent wrapper wasn't providing anything of value, now that the user can write and rust-lang#155341.

With this PR, `GCA` variant is removed from `AnonConstKind` so that generic anon consts are rejected.

Related: rust-lang/project-const-generics#113
…ggestion, r=mu001999

Avoid ICE in unconstrained generic parameter suggestion for enums

Fixes rust-lang#156701

`remove_or_use_generic` accepted structs, enums, and unions as ADT self types, but later used a local HIR lookup with `expect_struct()` when building the type-definition suggestion. That caused an ICE when the self type was an enum.
…c-improvements, r=folkertdev

note which target a missing target_feature belongs to

This PR attempts to improve diagnostics for invalid `target_feature` error, many years ago I experienced that [error](rust-lang#108680 (comment))

Closes: rust-lang#109531
…span, r=lolbinarycat

rustdoc: correct doctest span for trailing semicolon after item

Fixes rust-lang#157371.

When a doctest contains a trailing semicolon after an item, rustdoc can map the
resulting warning to unrelated source following the documentation block rather
than to the semicolon inside the doctest.

Changes only diagnostic span reporting.
…, r=BoxyUwU,samueltardieu

Added `PhantomPinned` diagnostic item and prevented dead field warning on `PhantomPinned`

This PR closes rust-lang#154888. See rust-lang#154978 and in [clippy#17056](rust-lang/rust-clippy#17056) for prior history on working on this issue.

From discussing with clippy team, we thought it'd be appropriate to use a diagnostic item attribute to mark `PhantomPinned` and prevent dead field warnings from being emitted in `missing_fields_in_debug.rs` and `pub_underscore_fields.rs`.

If you want me to do the clippy changes separately within the clippy repository, I can do that.
…mejrs,wesleywiser

Ensure that optimize attributes on closures are inherited by the shim.

Tracking issue: rust-lang#54882
Stabilization PR: rust-lang#157273
rustc_public: implement `ty::Alias` conversion

I don't know why there is a `todo!()` here. Am I overlooking anything?
…-ld, r=Mark-Simulacrum

Update wasm-component-ld to 0.5.25

Same as rust-lang#147495, just keeping it up-to-date.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 13, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 13, 2026
@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 Jun 13, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 13, 2026
Rollup of 10 pull requests

Successful merges:

 - #157714 (Improve polymorphization of raw pointer formatting)
 - #157653 (remove AliasTerm::def_id())
 - #157773 (Remove AnonConstKind::GCA and reject generic anon consts)
 - #157846 (Avoid ICE in unconstrained generic parameter suggestion for enums)
 - #157594 (note which target a missing target_feature belongs to)
 - #157740 (rustdoc: correct doctest span for trailing semicolon after item)
 - #157782 (Added `PhantomPinned` diagnostic item and prevented dead field warning on `PhantomPinned`)
 - #157802 (Ensure that optimize attributes on closures are inherited by the shim.)
 - #157812 (rustc_public: implement `ty::Alias` conversion)
 - #157833 (Update wasm-component-ld to 0.5.25)
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b1eac6c failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry
@bors treeclosed=5
so we don't need to yield all the time

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Tree closed for PRs with priority less than 5.

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2026
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: dist-riscv64-linux
##[endgroup]
    Updating crates.io index
error: failed to get `simd-adler32` as a dependency of package `miniz_oxide v0.8.8`
    ... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
    ... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `simd-adler32`

Caused by:

@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 Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 17m 29s
Pushing edff07c to main...

@rust-bors rust-bors Bot merged commit edff07c into rust-lang:main Jun 13, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 13, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#157594 note which target a missing target_feature belongs to 995c68c53783155e2ea5d8d39e535ad347f43098 (link)
#157653 remove AliasTerm::def_id() 9ff0448e869f7db189a26c92c975a497362346ff (link)
#157714 Improve polymorphization of raw pointer formatting 49000b7ba9ab07c1c6b8d9d1efe19f6206798c03 (link)
#157740 rustdoc: correct doctest span for trailing semicolon after … e0ae949d0921c57dcc4ab1932ec53324e3f5e4aa (link)
#157773 Remove AnonConstKind::GCA and reject generic anon consts b5bd974e22446217c544c17ac7564da70ce2f391 (link)
#157782 Added PhantomPinned diagnostic item and prevented dead fi… 57fe167a9b5fd81c2752d053116ab7be9352a426 (link)
#157802 Ensure that optimize attributes on closures are inherited b… c6bde4408263f70fd6ddd78cf1223641663a5094 (link)
#157812 rustc_public: implement ty::Alias conversion cfeb9fa4147a3b1e9e32f50d5e3b08a8c7d2f5eb (link)
#157833 Update wasm-component-ld to 0.5.25 6cc912b2bed7c72a197005536efdabadd6537258 (link)
#157846 Avoid ICE in unconstrained generic parameter suggestion for… 2b02d824d72f35c1bb3c60972b912d3eea50af36 (link)

previous master: 4e391cf242

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@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 4e391cf (parent) -> edff07c (this PR)

Test differences

Show 44 test diffs

Stage 1

  • [ui] tests/rustdoc-ui/doctest/main-warning-span-outside-doctest-issue-157371.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/gca/gca-anon-const-rejected.rs: [missing] -> pass (J1)
  • [ui] tests/ui/generics/unconstrained-param-enum-suggestion.rs: [missing] -> pass (J1)
  • [ui] tests/ui/target-feature/cross-arch-feature-note.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/const-generics/gca/gca-anon-const-rejected.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/generics/unconstrained-param-enum-suggestion.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/target-feature/cross-arch-feature-note.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/optimize-closure-shim.rs: [missing] -> pass (J6)

Stage 2

  • [ui] tests/ui/target-feature/cross-arch-feature-note.rs: [missing] -> ignore (gcc backend is marked as ignore) (J3)
  • [ui] tests/ui/const-generics/gca/gca-anon-const-rejected.rs: [missing] -> pass (J4)
  • [ui] tests/ui/generics/unconstrained-param-enum-suggestion.rs: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/optimize-closure-shim.rs: [missing] -> pass (J5)
  • [ui] tests/rustdoc-ui/doctest/main-warning-span-outside-doctest-issue-157371.rs: [missing] -> pass (J7)
  • [ui] tests/ui/target-feature/cross-arch-feature-note.rs: [missing] -> pass (J8)

Additionally, 30 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 edff07ce1a97f3eb39d438852ace6c57dd97605e --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-i686-linux: 1h 12m -> 1h 52m (+54.9%)
  2. dist-riscv64-linux: 1h -> 1h 28m (+47.5%)
  3. optional-x86_64-gnu-parallel-frontend: 2h -> 2h 40m (+33.7%)
  4. x86_64-msvc-ext1: 1h 48m -> 2h 24m (+33.4%)
  5. dist-aarch64-linux: 2h 38m -> 1h 46m (-33.0%)
  6. x86_64-gnu-stable: 2h 16m -> 1h 33m (-31.4%)
  7. x86_64-gnu-gcc-core-tests: 12m 18s -> 15m 23s (+25.1%)
  8. dist-x86_64-musl: 2h 20m -> 1h 45m (-24.6%)
  9. x86_64-msvc-1: 2h 51m -> 2h 11m (-23.6%)
  10. dist-x86_64-mingw: 2h 38m -> 2h 1m (-23.0%)
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 (edff07c): comparison URL.

Overall result: ❌✅ regressions and 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.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 3
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -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.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.6% [-5.6%, -5.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-5.6%, 2.5%] 2

Cycles

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

Binary size

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

Bootstrap: 516.925s -> 519.155s (0.43%)
Artifact size: 400.84 MiB -> 400.88 MiB (0.01%)

@jhpratt jhpratt deleted the rollup-DcP4hvf branch June 13, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.