Skip to content

Rollup of 7 pull requests#157999

Merged
rust-bors[bot] merged 16 commits into
rust-lang:mainfrom
jhpratt:rollup-iOGxMgl
Jun 17, 2026
Merged

Rollup of 7 pull requests#157999
rust-bors[bot] merged 16 commits into
rust-lang:mainfrom
jhpratt:rollup-iOGxMgl

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 17, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

theemathas and others added 16 commits May 23, 2026 21:01
This modifies the &mut -> &mut CoerceUnsized impl so that, it can
shorten the lifetime.

Note that there are already two impls that allow shortening the lifetime
like this (the &mut T -> &U and the &T -> &U impls). So this change
makes the impls consistent with each other.

I initially tried to also do the same to the CoerceUnsized impl for
core::cell::{Ref, RefMut}. However, this can't be done because
Ref and RefMut "store" the lifetime and the data in different fields,
and CoerceUnsized can only coerce one field.

This change has an effect on stable code, since it allows shortening
lifetimes inside invariant types via a &mut -> &mut unsize coercion.
Per naming bikeshed in libs-api. `Rng` is shorter, and already
established in the ecosystem. `System` makes it self-documenting that
`SystemRng` gets its randomness from the system RNG.
This patch updates `incremental-finalize-fail` on AIX by making the test's
proc-macro lookup to use the `.a` extension.

The test previously assumed that non-macOS, non-Windows targets produce a
`.so` proc-macro artifact. On AIX, the artifact is `libpoison.a`, which causes
the test to fail as it isn't able to find the proc-macro dylib for poison.
The cdylib export-symbols test was checking for `T my_function` on
all non-Darwin targets, but AIX prints the exported symbol as
`T .my_function`.

This patch updates the test to account for the AIX behavior so the test
validates the actual exported symbol correctly.
This attribute enables or disables function instrumentation
when using `-Zinstrument-xray` or `-Zinstrument-mcount`.

It supports the following usage:

`#[instrument_fn = "on|off"]`

For XRay, "on" is equivalent to always instrument, and "off" is
equivalent to never instrumenting.

For mcount, "on" has no effect. "off" disables instrumentation
of the function.
…r=oli-obk,mejrs

Add instrument_fn attribute

This attribute enables or disables function instrumentation when using `-Zinstrument-xray` or `-Zinstrument-mcount`.

It supports the following usage:

`#[instrument_fn = "on|off"]`

For XRay, "on" is equivalent to always instrument, and "off" is equivalent to never instrumenting.

For mcount, "on" has no effect. "off" disables instrumentation of the function.

This is tracked by rust-lang#157081, and related to the pending rfc rust-lang/rfcs#3917, and earlier as part mcp rust-lang/compiler-team#561
… r=jackh726

Allow shortening lifetime in CoerceUnsized for &mut

This modifies the &mut -> &mut CoerceUnsized impl so that, it can shorten the lifetime.

Note that there are already two impls that allow shortening the lifetime like this (the &mut T -> &U and the &T -> &U impls). So this change makes the impls consistent with each other.

I initially tried to also do the same to the CoerceUnsized impl for core::cell::{Ref, RefMut}. However, this can't be done because Ref and RefMut "store" the lifetime and the data in different fields, and CoerceUnsized can only coerce one field.

This change has an effect on stable code, since it allows shortening lifetimes inside invariant types via a &mut -> &mut unsize coercion.
… r=jhpratt

Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng`

Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG.

This also makes it short and convenient to write `SystemRng.fill_bytes`, rather than `DefaultRandomSource.fill_bytes`.
Some minor cleanups around hir ty/pat/expr

Just some avenues for deduplication that I noticed. Also makes sure we handle all three everywhere instead of just ty/expr like the diagnostic code previously did.
…lize-fail-test, r=folkertdev

Fix incremental-finalize-fail proc macro test on AIX

This patch updates `incremental-finalize-fail` on AIX by making the test's proc-macro lookup to use the `.a` extension.

The test previously assumed that non-macOS, non-Windows targets produce a `.so` proc-macro artifact. On AIX, the artifact is `libpoison.a`, which causes the test to fail as it isn't able to find the proc-macro dylib for poison.
…nethercote

run-make: handle AIX symbol cdylib export test

The cdylib export-symbols test was checking for `T my_function` on all non-Darwin targets, but AIX prints the exported symbol as `T .my_function`.

This patch updates the test to account for the AIX behavior so the test validates the actual exported symbol correctly.
…ds-disclaimer, r=mu001999

Add big disclaimer to the description of lint `explicit_outlives_requirements`
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 17, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 17, 2026
@jhpratt

jhpratt commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5083378 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 Jun 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 Jun 17, 2026
@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 38m
Pushing 98594f4 to main...

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

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#149219 Allow shortening lifetime in CoerceUnsized for &mut 5a91c63b000508beff0c2a0c36ea02f818e1a896 (link)
#157539 Rename RandomSource -> Rng, DefaultRandomSource -> `S… dbf3daae9f49536ebae117aa4d78e48526fc8ff7 (link)
#157681 Add instrument_fn attribute 86f1b498d557edbbacdd1a92ae4d5c2a3310b7e4 (link)
#157980 Some minor cleanups around hir ty/pat/expr 69081550ea926df6ad11bfcb480c6d062c941a5a (link)
#157988 Fix incremental-finalize-fail proc macro test on AIX 332a23b2d0d55840ec866e50824470390b7609de (link)
#157989 run-make: handle AIX symbol cdylib export test 5d298691dd360a00412286ad597f1bc5c6b7d47b (link)
#157998 Add big disclaimer to the description of lint `explicit_out… 032cac8a95799f140adb7151dcbf4a6c54f86f84 (link)

previous master: 1c0f17520a

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

@jhpratt jhpratt deleted the rollup-iOGxMgl branch June 17, 2026 07:03
@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 1c0f175 (parent) -> 98594f4 (this PR)

Test differences

Show 393 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/instrument_fn.rs#MCOUNT: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/instrument_fn.rs#XRAY: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/attributes/instrument_fn.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/coercion/unsize-lifetime-shrinking.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/feature-gates/feature-gate-instrument-fn.rs: [missing] -> pass (J2)
  • [ui] tests/ui/attributes/instrument_fn.rs: [missing] -> pass (J4)
  • [ui] tests/ui/coercion/unsize-lifetime-shrinking.rs: [missing] -> pass (J4)
  • [ui] tests/ui/feature-gates/feature-gate-instrument-fn.rs: [missing] -> pass (J4)

Stage 2

  • [codegen] tests/codegen-llvm/instrument_fn.rs#MCOUNT: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/instrument_fn.rs#XRAY: [missing] -> pass (J0)
  • [ui] tests/ui/attributes/instrument_fn.rs: [missing] -> pass (J3)
  • [ui] tests/ui/coercion/unsize-lifetime-shrinking.rs: [missing] -> pass (J3)
  • [ui] tests/ui/feature-gates/feature-gate-instrument-fn.rs: [missing] -> pass (J3)

Additionally, 380 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 98594f404ee741f97fefbae4aca049cde911bc94 --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. pr-check-1: 31m 15s -> 41m 41s (+33.4%)
  2. x86_64-gnu-llvm-21-1: 49m 58s -> 1h 3m (+26.3%)
  3. dist-x86_64-freebsd: 1h 35m -> 1h 13m (-23.6%)
  4. dist-aarch64-apple: 1h 44m -> 2h 6m (+21.4%)
  5. armhf-gnu: 1h 32m -> 1h 13m (-20.1%)
  6. x86_64-gnu-gcc-core-tests: 12m 26s -> 14m 49s (+19.1%)
  7. dist-apple-various: 1h 42m -> 1h 23m (-19.0%)
  8. dist-powerpc64le-linux-gnu: 1h 38m -> 1h 21m (-17.6%)
  9. x86_64-gnu: 2h 21m -> 1h 57m (-17.1%)
  10. pr-check-2: 39m 18s -> 33m 5s (-15.8%)
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 (98594f4): comparison URL.

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

Max RSS (memory usage)

Results (secondary -3.2%)

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)
-3.2% [-4.2%, -2.2%] 2
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.1%)

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)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.0%, 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)
0.0% [0.0%, 0.1%] 71
Regressions ❌
(secondary)
0.1% [0.0%, 0.3%] 63
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 71

Bootstrap: 523.093s -> 523.739s (0.12%)
Artifact size: 401.36 MiB -> 401.37 MiB (0.00%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants