Skip to content

Rollup of 7 pull requests - #163296

Merged
rust-bors[bot] merged 17 commits into
rust-lang:mainfrom
jhpratt:rollup-30Dq02h
Sep 25, 2026
Merged

rust-bors[bot] merged 17 commits into
rust-lang:mainfrom
jhpratt:rollup-30Dq02h

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 25, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mattst88 and others added 17 commits September 20, 2026 17:27
The ELFv1 ABI only passes "one member aggregates" containing a floating
point value in floating point registers. A union with more than one
member is not a one member aggregate, but `homogeneous_aggregate` merges
the fields of a union, so e.g. `union { f32, f32 }` was passed in an FPR,
while GCC and clang both pass it in a GPR.

Reject as a one-member aggregate any layout that is or contains a union
with more than one non-1-ZST field.
The ELFv1 ABI defines aggregates as structures and arrays; unions are
consistently listed separately. A union is therefore never a "one member
aggregate", not even when it has a single field or when it is nested
within a structure or array.

Extend the previous commit to reject any layout that is or contains a
union. This matches GCC in all cases. Clang still passes single-field
unions (including nested ones) in FPRs, contrary to the specification;
llvm/llvm-project#223481 fixes that.
In clang >= 23 the ABI for complex is incompatible with GCC. This has
been fixed in llvm/llvm-project#212340 and will
be part of clang 24
…agnostic, r=Amanieu

Preserve explicit register names in inline asm diagnostics

This PR adds diagnostic-only metadata directly to each register-bearing HIR operand, and replaces rust-lang#117912 AST lookup with the new HIR metadata.

Fixes rust-lang#159409
…ression-suggestion, r=estebank

Fix applicability level for cfg suggestion

Mark the semicolon, block-wrapping, and if cfg! suggestions for attribute-bearing expressions as `MaybeIncorrect`.

For example:
```rust
fn native_file_attributes(metadata: &std::fs::Metadata) -> u32 {
    #[cfg(unix)]
    std::os::unix::fs::MetadataExt::mode(metadata)
    #[cfg(windows)]
    std::os::windows::fs::MetadataExt::file_attributes(metadata)
}

fn main() -> std::io::Result<()> {
    let metadata = std::fs::metadata(std::env::current_exe()?)?;
    println!(
        "native file attributes: {:#x}",
        native_file_attributes(&metadata)
    );
    Ok(())
}
```

Adding ; discards the return value on Unix.

Replacing #[cfg] with if cfg! also fails because disabled branches still undergo name resolution and type checking.

Wrapping the expression in a block works here, but still can fail when multiple cfg branches are enabled and the first block returns a non-unit value.

For example:
```rust
fn value() -> u8 {
    #[cfg(all())]
    1

    #[cfg(all())]
    2
}
```

r? @estebank
make `Complex` ABI GCC-compatible on sparc

tracking issue: rust-lang#154023

In clang >= 23 the ABI for complex is incompatible with GCC. This has been fixed in llvm/llvm-project#212340 and will be part of clang 24.

Verified with abi-cafe.

r? beetrees
…, r=folkertdev,beetrees

powerpc64: don't pass unions in FPRs on ELFv1

Fixes rust-lang#162011.

The ELFv1 ABI only passes "one member aggregates" containing a floating point value in floating point registers. It defines aggregates as structures and arrays, and consistently lists unions separately, so a union is never a one member aggregate -- not even with a single field, and not when nested inside a structure or array.

`homogeneous_aggregate` merges the fields of a union and so cannot tell a union from a structure, which meant e.g. `union { f32, f32 }` was passed in an FPR. Add `is_or_contains_union`, which walks the layout a second time (mirroring the array and 1-ZST handling in `homogeneous_aggregate`), and reject any layout that is or contains a union.

This matches GCC in all cases. Clang still passes single-field unions in FPRs, contrary to the specification; llvm/llvm-project#223481 fixes that.
… r=Urgau

[rustdoc] Correctly check that an item is not `doc(hidden)` with `--generate-link-to-definition`

Needed for rust-lang#162808.

The problem was that we only checked the item itself, not any of its parents. Fixed by adding a loop.

r? @Urgau
…ze-align, r=thomcc

Tweak Layout::from_size_align_unchecked safety comment

This slightly tweaks wording of the Safety "contract" of Layout::from_size_align_unchecked. In my opinion, safety comments on function documentation should specify "here is how to safely use this function" rather than the more indirect form of "this function is unsafe because ...".

In this case the current docs are clear to me on how to use the function properly, but Its very uncommon that I see the safety comment worded in this sort of roundabout way, and typically when I see it in other crates its a lower quality safety comment that says something like "this function is unsafe because it uses a raw pointer", so I may just associate it with being a more wrong way to write the docs anyways.

Thought it worthwhile to open a PR for it to make it more direct and see what others think about "the ~right~ better way to word safety contracts"
…they

moving div_ceil() to associated items macro

Currently the div_ceil() method of unsigned NonZero is beeing generated inside the
`nonzero_integer_signedness_dependent_impls`
macro. This seems odd, as this macro seems to otherwise only be used for Trait impls, whereas associated methods like div_ceil() are all in the
`nonzero_integer_signedness_dependent_methods`
macro. If nothing else this causes an issue in the docs, where currently all unsigned NonZero types have two documented impl blocks, one containing only div_ceil(), and the other containing the remaining associated methods and constants.
This PR assumes that this is accidental. If that is not the case then maybe the explanation should be documented somewhere instead.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 25, 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 Sep 25, 2026
@jhpratt

jhpratt commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d7f0af0 has been approved by jhpratt

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 Sep 25, 2026
@rust-bors

This comment has been minimized.

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

rust-bors Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 3m 54s
Pushing 7618355 to main...

@rust-bors
rust-bors Bot merged commit 7618355 into rust-lang:main Sep 25, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 25, 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 0d38a84 (parent) -> 7618355 (this PR)

Test differences

Show 718 test diffs

Stage 1

  • [ui (polonius)] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86: [missing] -> pass (J3)
  • [ui (polonius)] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86_64: [missing] -> pass (J3)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86: [missing] -> pass (J4)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86_64: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/complex-abi.rs#SPARC: [missing] -> pass (J6)
  • [rustdoc-html] tests/rustdoc-html/jump-to-def/hidden-links.rs: [missing] -> pass (J7)

Stage 2

  • [codegen] tests/codegen-llvm/complex-abi.rs#SPARC: [missing] -> pass (J0)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86: [missing] -> ignore (gcc backend is marked as ignore) (J1)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86_64: [missing] -> ignore (gcc backend is marked as ignore) (J1)
  • [rustdoc-html] tests/rustdoc-html/jump-to-def/hidden-links.rs: [missing] -> pass (J2)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86: [missing] -> pass (J5)
  • [ui] tests/ui/asm/x86-explicit-register-alias-diagnostic.rs#x86_64: [missing] -> pass (J5)

Additionally, 706 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 7618355fd7d2681577129b93187d5cf3bff28dba --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. test-i686-gnu-1: 1h 33m -> 2h 27m (+58.7%)
  2. test-i686-gnu-nopt-2: 1h 19m -> 1h 59m (+50.3%)
  3. test-x86_64-msvc-ext3: 1h 25m -> 1h 56m (+36.1%)
  4. dist-x86_64-solaris: 1h 43m -> 1h 7m (-35.1%)
  5. test-x86_64-msvc-ext1: 1h 43m -> 2h 20m (+34.9%)
  6. test-x86_64-gnu-parallel-frontend: 1h 30m -> 2h 2m (+34.5%)
  7. dist-ohos-x86_64: 59m 17s -> 1h 18m (+31.9%)
  8. test-various: 1h 46m -> 2h 18m (+31.0%)
  9. dist-s390x-linux: 1h 32m -> 1h 3m (-30.7%)
  10. test-x86_64-gnu-stable: 1h 58m -> 2h 33m (+29.9%)
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 (7618355): 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)
-1.0% [-1.0%, -0.9%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -0.7%)

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

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

Cycles

Results (primary 2.8%, secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
4.1% [2.8%, 5.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.2% [-6.3%, -2.2%] 2
All ❌✅ (primary) 2.8% [2.8%, 2.8%] 1

Binary size

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

Bootstrap: 491.128s -> 492.862s (0.35%)
Artifact size: 406.18 MiB -> 406.26 MiB (0.02%)

@jhpratt
jhpratt deleted the rollup-30Dq02h branch September 25, 2026 06:26
@rust-bors

rust-bors Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160068 Preserve explicit register names in inline asm diagnostics f25609441114b572791ade7a841975cc1960fb44
(link)
#163239 Fix applicability level for cfg suggestion 4cd5c82374b7145f1d1e87c04884dbf5a667ab92
(link)
#163025 make Complex ABI GCC-compatible on sparc 2fad54d2501c870d5e9010ac6a462e511db7f763
(link)
#163076 powerpc64: don't pass unions in FPRs on ELFv1 e885f2fe3199c72fa6ae7498c2cecc524327b912
(link)
#163268 [rustdoc] Correctly check that an item is not doc(hidden)… d4de21524a7ca121fd868771afbfd45cd6ec754f
(link)
#163288 Tweak Layout::from_size_align_unchecked safety comment 241a0eb1b57dce1e5c5e0ad9882fa14bbcc723c1
(link)
#163292 moving div_ceil() to associated items macro c39588d0ba34ba5ce4114b8ce852c8f91642593c
(link)

parent commit: 0d38a84262

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants