Skip to content

Rollup of 14 pull requests#159142

Merged
rust-bors[bot] merged 30 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-HGW87Ca
Jul 11, 2026
Merged

Rollup of 14 pull requests#159142
rust-bors[bot] merged 30 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-HGW87Ca

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

JonathanBrouwer and others added 30 commits June 28, 2026 18:39
Cap the payload length to the buffer capacity so the declared length,
bytes copied, and returned count agree, matching TcpStream::write.
instead of the build triple

Debugging other architectures with the build target CDB is neither a common
nor a good user experience - for example, when targeting i686 from a x86_64
build target, you get all the internal WOW64 events, which also break
debuginfo tests.

Use the cdb.exe that corresponds to the target's architecture instead.
LLVM 23 is now handling register allocation slightly differently and
only uses CostPerUse=1 in -O{s,z} instead of unconditionally. This
causes the -O3 behavior in this test to be a little smarter and skip
some moves.

I have attempted to make the test pass on both LLVM 22 and 23 without
overly weakening it. Hopefully this is good enough!
`ExprKind::InlineAsm` was always printed as `asm!`, so `naked_asm!` was
printed as `asm!` too. Use `asm_macro.macro_name()` in the AST and HIR
pretty-printers to print the correct name.
…stics

Point users at `#![feature(generic_const_args)]` and `type const` items
when they hit the "generic parameters may not be used in const operations"
error, not just `generic_const_exprs`.
We do this by using old-style ThinVec for storing debuginfos collection, which is almost always empty.
…Mark-Simulacrum

Fix PR number in bootstrap's change tracker

Missed this in rust-lang#158912 🤦
…rk-Simulacrum

Include AtomicU128/AtomicI128 in docs for any target

Fixes rust-lang#130474

This is my first contribution, so I'll try to be as descriptive as possible of my process and thoughts.

- **Environment**: Cross compiled in Macbook M1 Air
- **Testing**: I replicated the bug and checked fixes with `./x doc library/core --target x86_64-unknown-linux-gnu` (building the std doc didn't seem to apply my local changes so I used the core doc) Check the screenshots below.
- **Diffs**: I added `#[cfg(any(...,doc))]` to all required structs and implementations so the types would compile. Applying`target_has_atomic_equal_alignment` part wasn't explicitly necessary, but adding it reveals the whole methods (specifically `from_mut` and `from_mut_slice`).
- **Thoughts**: Also wondered if additional messages should be written to notify the available targets, but the documentation already included the following sentence that seemed enough.
  - **Note:** This type is only available on platforms that support atomic loads and stores of `u128`/`i128`

[Before]
<img width="988" height="233" alt="image" src="https://github.com/user-attachments/assets/e22137c2-dfc9-4239-bd0d-75c5a2e2b84f" />

[After]
<img width="988" height="281" alt="image" src="https://github.com/user-attachments/assets/8ae83cb0-46f5-4cff-a576-2183466c202f" />

---
After the first work, doc tests were failing in CI, so I added `#[$cfg_cas]` to all methods  in the `atomic_int` macro to cover them. But I'm not really sure if all these changes are necessary (and appropriate).
This also has a side-effect of stating "Available on target_has_atomic=128 only." for all methods with the attribute. Also not sure if this is a good behavior..
<img width="978" height="454" alt="image" src="https://github.com/user-attachments/assets/b052f713-c8a9-4314-96be-a2832a6b84f6" />
…gnostic-156729, r=petrochenkov

diagnostics: suggest generic_const_args for const ops

fixes rust-lang#156729

when const ops hit generic params, like `[u8; size_of::<self>()]`, the diagnostic only points at `generic_const_exprs`. imo that's a stale nudge now that `generic_const_args` and `type const` items are the path we want people trying.

add help for `generic_const_args` and `type const` items in the resolve and hir_ty_lowering paths. also skip the old gce suggestion once `min_generic_const_args` is enabled, and emit both suggestions for the `self` alias path so the "alternatively" wording doesn't hang there by itself. includes the regression test from the issue. lgtm.
…ller, r=JohnTitor

Shrink mir::Statement to 40 bytes

We do this by using (old-style) ThinVec for storing debuginfo.

This collection is almost always empty, so we can optimize for that case. I think we could do better by storing the debuginfo elsewhere, but this is the least invasive change for now.
… r=lolbinarycat

rustdoc: test ignoring rustc lints in CLI

This works, but I couldn't find any tests for it.
…nthey

std: use `OnceLock` for SGX argument storage

Just like rust-lang#158180, using a `OnceLock` is much better. Though I guess that in this case a `static mut` would be fine as well...

CC @jethrogb @raoulstrackx @aditijannu
… r=chenyukang

Add regression test for $-prefixed fragment specifier in repetition

Fixes rust-lang#157157.

The diagnostic was fixed in rust-lang#155643, but the existing test only covers an accidental `$` before a fragment specifier at the top level of a matcher.
This adds the equivalent case inside a repetition.

The new case reuses `$test:$tt` from the adjacent test so that repetition nesting is the only difference between the two cases.

Tested with:
- `./x test tests/ui/macros/macro-missing-fragment.rs`

This is my first contribution to this repository, so please let me know if I have missed any conventions or required steps or should make any additional changes.
Fix feature gate for `repr(simd)`

The following code currently compiles on stable rust:
```rust
#[repr(simd)]
println!()
```

This has the following behavior:
- 1.90 and earlier give an "unused attribute warning"
- 1.91 ..= beta give no diagnostic output
- nightly gives the following:
```
warning: `#[repr(simd)]` attribute cannot be used on macro calls
 --> src/main.rs:4:5
  |
4 |     #[repr(simd)]
  |     ^^^^^^^^^^^^^
  |
  = help: `#[repr(simd)]` can only be applied to structs
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default
```

This PR changes this to a feature gate **error**.
r? @mejrs
…k-Simulacrum

Fix multiple logic bugs in `Arc::make_mut`

See the following (nightly-specific) issues:
- Fixes rust-lang#158875
- Fixes rust-lang#155746
- Fixes rust-lang#157203
…lacrum

std: fix Xous UDP send_to length mismatch and truncation

Cap the payload length to the buffer capacity so the declared length, bytes copied, and returned count agree, matching TcpStream::write.
…target, r=jieyouxu

Look for the cdb architecture that corresponds to the target triple

instead of the build triple

Debugging other architectures with the build target CDB is neither a common nor a good user experience - for example, when targeting i686 from a x86_64 build target, you get all the internal WOW64 events, which also break debuginfo tests. (See rust-lang#159032)

Use the cdb.exe that corresponds to the target's architecture instead.
…rtdev

riscv: update c-variadic test for LLVM changes

LLVM 23 is now handling register allocation slightly differently and only uses CostPerUse=1 in -O{s,z} instead of unconditionally. This causes the -O3 behavior in this test to be a little smarter and skip some moves.

I have attempted to make the test pass on both LLVM 22 and 23 without overly weakening it. Hopefully this is good enough!

llvm/llvm-project@046bd54 is the matching LLVM change.

@rustbot label: +llvm-main
…-name, r=folkertdev

pretty-print: use inline asm's actual macro name

`ExprKind::InlineAsm` was always printed as `asm!`, so `naked_asm!` was printed as `asm!` too. Use `asm_macro.macro_name()` in the AST and HIR pretty-printers to print the correct name.
…kruppe

doc: use ptr::addr in offset_from docs

`ptr::addr()` has been stable since Rust 1.84. Update the three `offset_from` docs to use it for address-only arithmetic across allocations, and remove the stale FIXME comments.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 11, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7e86eec has been approved by JonathanBrouwer

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

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 9m 41s
Pushing be8e824 to main...

@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 acf6a00 (parent) -> be8e824 (this PR)

Test differences

Show 2006 test diffs

Stage 1

  • [ui] tests/rustdoc-ui/lints/deny-cmd.rs#allow: [missing] -> pass (J0)
  • [ui] tests/rustdoc-ui/lints/deny-cmd.rs#deny: [missing] -> pass (J0)
  • arc::issue_155746_make_mut_panic_safety: [missing] -> pass (J2)
  • arc::issue_158875_make_mut_dont_leak_allocator: [missing] -> pass (J2)
  • rc::issue_158875_make_mut_dont_leak_allocator: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.rs: [missing] -> pass (J4)
  • [ui (polonius)] tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.rs: [missing] -> pass (J6)

Stage 2

  • [ui] tests/rustdoc-ui/lints/deny-cmd.rs#allow: [missing] -> pass (J1)
  • [ui] tests/rustdoc-ui/lints/deny-cmd.rs#deny: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.rs: [missing] -> pass (J3)
  • arc::issue_155746_make_mut_panic_safety: [missing] -> pass (J5)
  • arc::issue_158875_make_mut_dont_leak_allocator: [missing] -> pass (J5)
  • rc::issue_158875_make_mut_dont_leak_allocator: [missing] -> pass (J5)

Additionally, 1993 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 be8e82435eb04fbe75ed5286b52735366e160bed --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-loongarch64-linux: 1h 10m -> 1h 46m (+51.3%)
  2. dist-x86_64-apple: 1h 31m -> 1h 58m (+28.7%)
  3. x86_64-gnu-next-trait-solver-polonius: 1h 1m -> 43m 39s (-28.6%)
  4. x86_64-gnu-gcc-core-tests: 14m 12s -> 10m 11s (-28.2%)
  5. dist-powerpc64le-linux-gnu: 1h 14m -> 1h 35m (+28.0%)
  6. dist-sparcv9-solaris: 1h 13m -> 1h 33m (+27.9%)
  7. x86_64-msvc-ext1: 2h 18m -> 1h 40m (-27.6%)
  8. x86_64-msvc-2: 2h 29m -> 1h 49m (-26.8%)
  9. i686-gnu-2: 1h 37m -> 1h 11m (-26.4%)
  10. x86_64-gnu-llvm-21-1: 42m 58s -> 53m 53s (+25.4%)
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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#159126 Fix PR number in bootstrap's change tracker ab5b0e4f98fdd24fdd326172a73febd79e6e6b0f (link)
#155811 Include AtomicU128/AtomicI128 in docs for any target 110e1cc9381b62d9970609f712f12f7ab8dfaac8 (link)
#156968 diagnostics: suggest generic_const_args for const ops 7c78d0b831decf90f9107b65f6517434040af8cc (link)
#159012 Shrink mir::Statement to 40 bytes ca5b0d2685dba97bc574c70f0eeab3c4a999b693 (link)
#156618 rustdoc: test ignoring rustc lints in CLI 50e67fcf4a27904b67894e30f0e011c13f1ae9d8 (link)
#158182 std: use OnceLock for SGX argument storage 469b5f59223d2b70ab9fe0e79ef1644c2196717a (link)
#159114 Add regression test for $-prefixed fragment specifier in re… c5c51dba599d8b57c714dc38e80c10a6eb2e70c9 (link)
#158523 Fix feature gate for repr(simd) af9814fcec0184366f8f183a0892dc94129660d3 (link)
#158876 Fix multiple logic bugs in Arc::make_mut 69b263a47cb6c337421a2a837d63d854d17bbade (link)
#158928 std: fix Xous UDP send_to length mismatch and truncation 77043cdb7a8d444d6e83d535ed9d8bc6542a2f00 (link)
#159060 Look for the cdb architecture that corresponds to the targe… 61d13e516c4fece447520a4a537cbce361ae6f1c (link)
#159089 riscv: update c-variadic test for LLVM changes ee0c6949c9013fa7604dc3ec264cbea8844b553a (link)
#159093 pretty-print: use inline asm's actual macro name 5c4035e113921f703aa9950ea74370828d3330ec (link)
#159122 doc: use ptr::addr in offset_from docs db2aa583bc6ab4ba0d28455bb66766a3afd7413f (link)

previous master: acf6a00aff

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

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (be8e824): 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)
-0.3% [-0.3%, -0.3%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.3%, secondary -2.5%)

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

mean range count
Regressions ❌
(primary)
3.6% [3.6%, 3.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-3.5%, -0.5%] 35
Improvements ✅
(secondary)
-2.5% [-4.1%, -1.0%] 29
All ❌✅ (primary) -1.3% [-3.5%, 3.6%] 36

Cycles

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

Binary size

Results (primary 0.0%, secondary 0.0%)

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

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 2
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 2

Bootstrap: 489.809s -> 488.088s (-0.35%)
Artifact size: 389.31 MiB -> 389.26 MiB (-0.01%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.