Skip to content

Rollup of 13 pull requests - #163363

Merged
rust-bors[bot] merged 42 commits into
rust-lang:mainfrom
jhpratt:rollup-zVCvTBh
Sep 26, 2026
Merged

rust-bors[bot] merged 42 commits into
rust-lang:mainfrom
jhpratt:rollup-zVCvTBh

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 26, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

theemathas and others added 30 commits August 25, 2026 07:08
In 5d81891 ("Always inline functions signatures containing `f16` or
`f128`"), these types were changed to automatically inline so codegen
wouldn't crash on poorly-supported platforms. We have since gained a cfg
to reflect the type's codegen reliability. Update so we only check and
auto-inline based on type if this config is set, which makes `f16` and
`f128` act more like any other type on most platforms.

We still can't remove this entirely since a lot of API in `std` wouldn't
get inlined and would crash the few remaining poorly-supported
backend+target combinations.
There is one match arm handling some `ForceWarning` cases and another
arm handling the remaining `ForceWarning` case and also `Expect`. They
can be rearranged into one arm handling `ForceWarning` and one arm
handling `Expect`.

Also fix some comments:
- `ForceWarning` no longer has a field.
- Clarify the `LintExpectationId` location.
- The one about deduplication was inverted.
I think the ship has sailed on the "every error should have an error
code" idea and it's not worth pretending otherwise.
This is a part of the stack-protector work.

Adding support for merge-functions is not strictly needed, but it does
prevent breakage if the GCC function merging logic changes.

Not adding tests for -Z merge-functions since I don't see any such tests for the
LLVM side of it.
we can pass it by reference when we have it (loan traversal), and use the one in regioncx's LivenessValues
when we don't have it already in scope (MIR dump traversal)
we're really deferring the region liveness computation to become on-demand, "deferred locals" is slightly inaccurate
in that some of the local's type data is also necessary for drop-liveness. we can focus on the output of the computation
rather than its inputs.

it also allows us to rename the suboptimal set of locals `deferred` colliding with `deferred_locals`
rename the various `deferred` to mention locals, now that `DeferredLocals` doesn't use `deferred_locals`
by not calling `compute_relevant_live_locals`:
- remove free regions hashset allocation
- remove unused boring locals allocation
- remove relevant locals vec allocation
- directly build relevant locals with nll_boring locals filtering

we could also optimize the boring nll locals hashset but it's unclear whether it's worth it
compared to when it's being iterated.
we previously always created an unsolved regioncx to immediately solve it, but can create
the solved regioncx in a single step.

this is done by merging `UnsolvedRegionInferenceContext`'s `new` and `solve` into one constructor.
When a derive macro expands the annotated item's name directly using
`quote!`, it keep the item's Span context (instead of having a new
context). This means that the generic Span context machinery which
provides feedback that an error happened due to a derive doesn't kick
in.

If a derive macro isn't written to take into account the existence of
type parameters, an error for "mismatched number of type parameters"
will be emitted. We now detect the case when this happens due to the
derive macro, and customize the output to point that out, as well as
avoid giving suggestions that will always be wrong.
Because they're all just special cases of warnings. This requires
introducing a new `Option<EmissionOverride>` field to `Warning` that
describes the special case behaviour; the `DiagInner::lint_id` field
also gets merged in.

Specific nice things about this:

- Removes some unreachable match arms for `Allow`/`Expect`.

- Removes the hacky upgrading of `Allow`/`Expect` to `Warning` in
  `emit_future_breakage_report`.

- The types now have structure that used to be maintained by comments
  and assertions. E.g. it's now impossible to not have a `lint_id` for
  an `expect` lint. (I always found the `DiagInner::lint_id` field
  confusing; it's clearer now.)

- There's a nice comment on `EmissionOverride` summarizing all the
  different cases.

- A little less code overall.
Detect bad number of generics caused by bad derive

When a derive macro expands the annotated item's name directly using `quote!`, it keep the item's Span context (instead of having a new context). This means that the generic Span context machinery which provides feedback that an error happened due to a derive doesn't kick in.

If a derive macro isn't written to take into account the existence of type parameters, an error for "mismatched number of type parameters" will be emitted. We now detect the case when this happens due to the derive macro, and customize the output to point that out, as well as avoid giving suggestions that will always be wrong.

Partially address rust-lang#160463 (this doesn't detect a nameres error caused by referencing type parameter within a derive).

```
error[E0107]: missing generics for enum `A`
 --> bar.rs:8:6
  |
7 | #[derive(A)]
  |          - it looks like this derive macro might not support items with generic parameters
8 | enum A<T> {
  |      ^
```

r? @petrochenkov
…larfonthey

Add some docs to `Global`

r? libs
…t, r=jieyouxu

simplify ndk compiler test
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 26, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Sep 26, 2026
@jhpratt

jhpratt commented Sep 26, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 84d685f 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 26, 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 Sep 26, 2026
@rust-bors

rust-bors Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 7m
Pushing fd98695 to main...

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

Test differences

Show 69 test diffs

Stage 0

  • utils::cc_detect::tests::test_language_clang: pass -> [missing] (J0)
  • utils::cc_detect::tests::test_language_compiler_names: [missing] -> pass (J0)
  • utils::cc_detect::tests::test_language_gcc: pass -> [missing] (J0)
  • utils::cc_detect::tests::test_ndk_compiler: [missing] -> pass (J0)
  • utils::cc_detect::tests::test_ndk_compiler_c: pass -> [missing] (J0)
  • utils::cc_detect::tests::test_ndk_compiler_cpp: pass -> [missing] (J0)

Stage 1

  • [rustdoc-html] tests/rustdoc-html/inline_cross/glob-of-reexports-53724.rs: [missing] -> pass (J1)
  • [rustdoc-html] tests/rustdoc-html/jump-to-def/incoherent_impl.rs: [missing] -> pass (J1)
  • [ui] tests/ui/derives/derive-macro-unsupported-type-params.rs: [missing] -> pass (J3)
  • [ui] tests/ui/pub/pub-reexport-extern-std-issue-163293.rs: [missing] -> pass (J3)
  • [ui (polonius)] tests/ui/derives/derive-macro-unsupported-type-params.rs: [missing] -> pass (J7)
  • [ui (polonius)] tests/ui/pub/pub-reexport-extern-std-issue-163293.rs: [missing] -> pass (J7)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#DEFAULT: [missing] -> pass (J8)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#NOPT: [missing] -> pass (J8)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#default: pass -> [missing] (J8)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#nopt: pass -> [missing] (J8)

Stage 2

  • [rustdoc-html] tests/rustdoc-html/inline_cross/glob-of-reexports-53724.rs: [missing] -> pass (J2)
  • [rustdoc-html] tests/rustdoc-html/jump-to-def/incoherent_impl.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#DEFAULT: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#NOPT: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#default: pass -> [missing] (J4)
  • [codegen] tests/codegen-llvm/float/f16-f128-inline.rs#nopt: pass -> [missing] (J4)
  • [ui] tests/ui/derives/derive-macro-unsupported-type-params.rs: [missing] -> pass (J5)
  • [ui] tests/ui/pub/pub-reexport-extern-std-issue-163293.rs: [missing] -> pass (J5)
  • [assembly] tests/assembly-gcc/stack-protector/stack-protector-heuristics-effect.rs#all: [missing] -> pass (J6)
  • [assembly] tests/assembly-gcc/stack-protector/stack-protector-heuristics-effect.rs#basic: [missing] -> pass (J6)
  • [assembly] tests/assembly-gcc/stack-protector/stack-protector-heuristics-effect.rs#missing: [missing] -> pass (J6)
  • [assembly] tests/assembly-gcc/stack-protector/stack-protector-heuristics-effect.rs#none: [missing] -> pass (J6)
  • [assembly] tests/assembly-gcc/stack-protector/stack-protector-heuristics-effect.rs#strong: [missing] -> pass (J6)

Additionally, 40 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 fd98695850065878fa7de48808dca4f0901cefbb --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-x86_64-gnu-miri: 52m 44s -> 1h 32m (+74.7%)
  2. test-x86_64-gnu-debug: 1h 19m -> 2h 12m (+66.8%)
  3. test-i686-gnu-nopt-1: 1h 30m -> 2h 24m (+60.2%)
  4. dist-i686-linux: 1h 10m -> 1h 51m (+57.4%)
  5. test-aarch64-apple-macos-26-1: 4h 40m -> 2h 2m (-56.2%)
  6. test-x86_64-gnu-tools: 45m 22s -> 1h 10m (+54.6%)
  7. dist-riscv64-linux-gnu: 1h 2m -> 1h 28m (+41.2%)
  8. dist-armv7-linux: 1h 6m -> 1h 32m (+40.6%)
  9. dist-x86_64-musl: 2h 25m -> 1h 29m (-38.2%)
  10. test-i686-gnu-2: 1h 20m -> 1h 48m (+35.6%)
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 (fd98695): 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.7% [0.7%, 0.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.8%, secondary 0.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)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -1.8% [-1.8%, -1.8%] 1

Cycles

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

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)
6.6% [6.6%, 6.6%] 1
Improvements ✅
(primary)
-13.3% [-20.7%, -7.7%] 6
Improvements ✅
(secondary)
-3.9% [-8.4%, -1.4%] 3
All ❌✅ (primary) -13.3% [-20.7%, -7.7%] 6

Binary size

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

Bootstrap: 487.474s -> 490.11s (0.54%)
Artifact size: 406.22 MiB -> 406.28 MiB (0.01%)

@rust-bors

rust-bors Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160695 Detect bad number of generics caused by bad derive da8ca5f14477f1f98049a5bf788de2ed2ee0adf2
(link)
#162883 No longer auto-inline f16 and f128 on well-supported pl… 0840c91c6cee4008a950907b5a43e438f435fc67
(link)
#163133 [rustdoc] Fix invalid jump to def link when `#[rustc_allow_… 6406f6d373256554a103b7c7ae35f7a6b8198a00
(link)
#163215 Fix suggestion for Option to bool with proper precedence ha… 0c487f94aa0981853df8ad97baa738bcb817396d
(link)
#163266 More deferred liveness cleanups 5f63d21f3fa1b07809ca09c3ef42eaec7fdb650a
(link)
#163274 Support -Z merge-functions with gcc and add stack-protector… 8020756e21736e9674c135e393174426dce8c527
(link)
#163290 Merge ForceWarning/Allow/Expect into Warning da89441153158a6b6df68372f834a992b994e01c
(link)
#163298 Don't emit sugg for pub-reexport extern std 8ddc1ffb21e5e90b73270cc13b0d94358ba239c0
(link)
#163312 Add rustdoc regression test for glob import of a crate that… 7fc4313ec78cdd456752b25616ecb81c8137ca1b
(link)
#163357 Borrowck cleanups part trois b19b96e91a38daabb62cfd88acd6e3b90608a25b
(link)
#161710 Stabilize mem::conjure_zst 1a21a406f68bfca8da8ce7d3f08b4c8fb3750761
(link)
#163332 Add some docs to Global 37ca477657dcec49611bacdd9e287648505db056
(link)
#163362 simplify ndk compiler test 94f23346089eec0cbcdcdff0a51eb0c8c67c8775
(link)

parent commit: 90c195e097

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.

@jhpratt
jhpratt deleted the rollup-zVCvTBh branch September 28, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.