Skip to content

Rollup of 9 pull requests - #166674

Merged
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-voPQcW8
Nov 27, 2026
Merged

rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-voPQcW8

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

maxdexh and others added 24 commits September 30, 2026 20:25
## Stabilization report

### What is stabilized

With trim-paths `object` scope and debuginfo on,
Cargo writes `<artifact>.trim-paths.json` beside each final artifact.
The "unremap" file maps the remapped paths back to local ones.

This stabilizes debugger script changes:
`rust-gdb` and `rust-lldb` by default load `{gdb,lldb}_trim_paths.py`,
which read the unremap files and apply them
through GDB `substitute-path` or LLDB `target.source-map`
to set up source file path substitutions.

### What changes

* After stabilization, set `RUST_{GDB,LLDB}_TRIM_PATHS=0` to opt out.
  Before, this needed `RUST_{GDB,LLDB}_TRIM_PATHS=unstable`.
* After stabilization, both scripts are shipped on all channels.
  Before, they were shipped only on nightly.

### Why we don't want to stabilize

* This makes debugger scripts relying on Cargo-specific file format,
  inversing the dependency relation.
* There is no integration test for them.
  (and debugger scripts actually don't have many tests)

### Docs

See Cargo's the "Unremap files" section:
<https://github.com/rust-lang/cargo/blob/ac74ae3c603b9efce95b07383b46d3103e834d9a/doc/book/src/reference/profiles.md?plain=1#L337-L386>
I guess things got renamed and there were some editing mishaps.
…ustdoc, r=GuillaumeGomez

Stabilize `--remap-path-scope` in rustdoc and the `documentation` scope

# Stabilization report of  `--remap-path-scope` in rustdoc and the `documentation` scope

## Summary

`rustc` supports remapping source paths prefixes as a best effort in all compiler generated output, including compiler diagnostics, debugging information, macro expansions, documentation, doctests, etc.

This is useful for normalizing build products, for example, by removing the current directory out of the paths emitted into object files.

This stabilization stabilize the same flag used by `rustc` to control which generted output has remapped paths in `rustdoc`.

Cargo is starting to use the `rustc` flag with rust-lang/cargo#17488.

Tracking issue: rust-lang#155451.

It's the last major part of the trim-paths feature.

### What is stabilized

The rustdoc `--remap-path-scope` flag is being stabilized by this PR. It's equivalent to [the rustc flag](https://doc.rust-lang.org/rustc/remap-source-paths.html#--remap-path-scope).

It permits defines which scopes should be remapped by `-–remap-path-prefix`: `macro,diagnostics,documentation,debuginfo,coverage,object,all`.

#### Example

```sh
rustdoc src/lib.rs --remap-path-prefix="$PWD=/foo" --remap-path-prefix=documentation
```

#### The `documentation`

In addition to the [other scopes](https://doc.rust-lang.org/rustc/remap-source-paths.html#--remap-path-scope) (`diagnostics`, `debuginfo`, ...). `rustdoc` uses the `documentation` scope, it's a new scope to be shared with `rustc` (T-compiler [FCP here](rust-lang#163896)).

## Implementation

### Major parts

- rust-lang#155357
- rust-lang#151589
- rust-lang#163956
- rust-lang#164278
- rust-lang#164279

### Coverage

- [`tests/rustdoc-ui/remap-path-prefix.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/rustdoc-ui/remap-path-prefix.rs)
- [`tests/rustdoc-ui/remap-path-prefix-doctest.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/rustdoc-ui/remap-path-prefix-doctest.rs)
- [`tests/ui/errors/remap-path-prefix-macro.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/ui/errors/remap-path-prefix-macro.rs)
- [`tests/ui/errors/remap-path-prefix-diagnostics.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/ui/errors/remap-path-prefix-diagnostics.rs)

### Outstanding bugs

There are no outstanding bugs regarding `--remap-path-scope` in `rustdoc`.

There are [caveats and limitation](https://doc.rust-lang.org/nightly/rustc/remap-source-paths.html#caveats-and-limitations) in `rustc`, but they mostly concern generated object files, which we don't really have.

### Outstanding FIXMEs

There are no FIXME regarding `--remap-path-scope` (in rustc or rustdoc).

Fixes rust-lang#163896
Fixes rust-lang#155451
…, r=Urgau

debugger: stabilize trim-paths unremap file loading

## Stabilization report

### What is stabilized

With trim-paths `object` scope and debuginfo on, Cargo writes `<artifact>.trim-paths.json`[^1] beside each final artifact. This "unremap" file, maps the remapped paths back to local ones. The file format and remapping rules are stabilized as part of FCP on Cargo side: rust-lang/cargo#17488

This stabilizes debugger script changes: `rust-gdb` and `rust-lldb` by default load `{gdb,lldb}_trim_paths.py`, which read the unremap files and apply them through GDB `substitute-path` or LLDB `target.source-map` to set up source file path substitutions.

Note that we already apply an unremap for `/rustc/$RUSTC_COMMIT_HASH` paths, so it wouldn't be a new capability per se, just an extension of it.

### What changes

* After stabilization, set `RUST_{GDB,LLDB}_TRIM_PATHS=0` to opt out.
  Before, it required `RUST_{GDB,LLDB}_TRIM_PATHS=unstable` to enable.
* After stabilization, both scripts are shipped on all channels.
  Before, they were shipped only on nightly.

### Why we don't want to stabilize

* This makes debugger scripts relying on Cargo-specific file format, inversing the dependency relation.
* There is no integration test for them.
  (and debugger scripts actually don't have many tests)

### Docs

See Cargo's the "Unremap files" section: <https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#unremap-files>.

> The unremap file is in JSON format:
>
> * `v` carries the format version.
> * `rust_version` and `workspace_root` are file-level metadata, namely the toolchain version and the workspace root.
> * `remaps` is an array of records. Each record maps a sanitized path prefix in the artifact (`from`) back to the local path it replaced (`to`), ordered by the `from` prefix. Note that this follows the debugger substitution direction, which is the inverse of `--remap-path-prefix`.
>
> An example of the unremap file:
>
> ```json
> {
>   "v": 1,
>   "rust_version": "1.96.0-nightly",
>   "workspace_root": "/home/me/app",
>   "remaps": [
>     { "from": ".", "to": "/home/me/app" },
>     { "from": "/cargo/build-dir", "to": "/home/me/app/target" },
>     { "from": "/cargo/registry/6f17d22d3f0a95d1", "to": "/home/me/.cargo/registry/src/index.crates.io-6f17d22d3f0a95d1" },
>     { "from": "/rustc/abc123", "to": "/home/me/.rustup/toolchains/nightly/lib/rustlib/src/rust" }
>   ]
> }
> ```
>
> Since it is meant to be a debugging aid, it includes absolute paths of your system, so there is no artifact privacy guarantee. You might want to exclude `*.trim-paths.json` files when distributing artifacts.

---

Should be shipped after <rust-lang#163881> (or along with that)
…3898-clean, r=petrochenkov

fix: ignore format literal source availability in stable hashes

fixes [rust-lang#153898](rust-lang#153898).

installing rust-src could change a crate's strict version hash (SVH) due to source-dependent format-string desugaring.
this change excludes the diagnostic-only FormatLiteral.source field from stable hashing while preserving diagnostic behavior.

adds a regression test covering unimplemented!, todo!, unreachable!, and generic functions.
verifies metadata with and without rust-src using identical compiler flags.

r? compiler
…eetrees

add c-variadic support for `x87_f80`

tracking issue: rust-lang#163982

The default paths already have the right behavior. Validated with abi-cafe.
…r=nnethercote

Remove `fn terminator()` and `terminator_mut()`

Follow-up to @panstromek's work to remove the `Option` here.
…t, r=folkertdev

Don't round the number of bits passed to `{Size,Align}::from_bits`

The current behaviour is more likely to mask typos than be the intended behaviour, and can give the misleading impression that `Size` can store sizes that are a non-whole-number of bytes. This is particularly nonsensical for `Align::from_bits` where `Align::from_bits(24)` has always been an error whereas `Align::from_bits(25)` was rounded up to a 32-bit alignment before this PR. The only places where the current rounding behaviour is relied upon are a few places where `Size::from_bits(1)` is used as a constant to represent the size of a `bool` (1 byte) - this PR replaces those with the more explicit `Size::from_bytes(1)`/`Size::from_bits(8)`. If the rounding behaviour is needed in the future, a dedicated `Size::ceil_from_bits` method can be added.

r? @folkertdev
… r=clarfonthey

Remove `T: Send + Sync` bound from `Arc::downcast`

[Discussion](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Why.20the.20.60T.3A.20Send.20.2B.20Sync.60.20bound.20in.20.60Arc.3A.3Adowncast.60.3F/with/617793925) on zulip

Implements the change described in rust-lang/libs-team#859.
T-libs can pick if they want to skip the ACP or not.

@rustbot label needs-fcp T-libs
…-dir-override, r=Kobzol

fix: bootstrap build directory handling with --set

fixes rust-lang#166607
handle `--set build.build-dir` in python bootstrap using the existing toml parser, so both bootstrap implementations use the same directory.
added unit tests and verified the original repro.
cc @Kobzol
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 27, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rc Area: `Rc` and `Arc` A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2026
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. labels Nov 27, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8f9a58e 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 Nov 27, 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 Nov 27, 2026
@rust-bors

rust-bors Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 2h 49m 44s
Pushing c82ce15 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 b61bfe5 (parent) -> c82ce15 (this PR)

Test differences

Show 38 test diffs

Stage 1

  • [run-make] tests/run-make/svh-rust-src-availability: [missing] -> pass (J0)
  • [ui] tests/rustdoc-ui/remap-path/remap-path-scope-unstable.rs: pass -> [missing] (J0)
  • [ui (polonius)] tests/ui/feature-gates/remap-path-scope-documentation.rs: pass -> [missing] (J2)
  • [ui] tests/ui/feature-gates/remap-path-scope-documentation.rs: pass -> [missing] (J6)

Stage 2

  • [run-make] tests/run-make/svh-rust-src-availability: [missing] -> ignore (ignored when cross-compiling) (J1)
  • [ui] tests/rustdoc-ui/remap-path/remap-path-scope-unstable.rs: pass -> [missing] (J3)
  • [ui] tests/ui/feature-gates/remap-path-scope-documentation.rs: pass -> [missing] (J4)
  • [run-make] tests/run-make/svh-rust-src-availability: [missing] -> pass (J5)

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 c82ce15637153c025d29abbaff6035a177361788 --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-msvc-ext3: 1h 10m -> 1h 48m (+53.1%)
  2. dist-loongarch64-musl: 1h 19m -> 2h 1m (+52.6%)
  3. dist-x86_64-musl: 1h 40m -> 2h 24m (+44.2%)
  4. test-i686-gnu-nopt-1: 2h 27m -> 1h 28m (-39.8%)
  5. test-x86_64-gnu-nopt: 1h 33m -> 2h 11m (+39.6%)
  6. test-x86_64-gnu-aux: 2h 46m -> 1h 43m (-38.2%)
  7. optional-test-x86_64-gnu-autodiff: 43m 19s -> 59m 48s (+38.1%)
  8. dist-x86_64-msvc-alt: 2h 4m -> 2h 48m (+34.6%)
  9. dist-sparcv9-solaris: 1h 43m -> 1h 7m (-34.6%)
  10. dist-ohos-aarch64: 56m 34s -> 1h 15m (+33.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-bors

rust-bors Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#163895 Stabilize --remap-path-scope in rustdoc and the `document… 46d6fbe647daeeeb45acbb2ee6190e773944d740
(link)
#163910 debugger: stabilize trim-paths unremap file loading 88ca14e7e2016e19ca1e4b10c63ed4ebda1ff814
(link)
#166377 fix: ignore format literal source availability in stable ha… b0122f65dd0396b02642072051d3fd20b627f837
(link)
#166510 add c-variadic support for x87_f80 0dc1cc2a0c24dbc03b3e945493c526ca9dcc5cda
(link)
#166631 Remove fn terminator() and terminator_mut() b0d5e0b0d45e1e0b0b6ff8b27f0fde6c043a3017
(link)
#166650 Don't round the number of bits passed to `{Size,Align}::fro… d096434db09e09d55e25774fb0a79c28ac34328c
(link)
#161531 Remove T: Send + Sync bound from Arc::downcast 7e85d8f53d83389936f314060c72a709bf6131a1
(link)
#166641 fix: bootstrap build directory handling with --set b66322769987f195e6c6f997a6305fd5de1437c0
(link)
#166655 Submodule update of rustc-perf 097c129a278c007d721579200a67e0fd24e28a5e
(link)

parent commit: b61bfe5f22

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.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (c82ce15): 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)
-2.3% [-4.9%, -0.2%] 35
Improvements ✅
(secondary)
-2.1% [-4.9%, -0.3%] 27
All ❌✅ (primary) -2.3% [-4.9%, -0.2%] 35

Max RSS (memory usage)

Results (primary -2.5%, 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)
3.0% [2.2%, 3.8%] 2
Regressions ❌
(secondary)
0.6% [0.5%, 0.7%] 2
Improvements ✅
(primary)
-2.8% [-4.3%, -0.8%] 39
Improvements ✅
(secondary)
-3.4% [-6.2%, -0.4%] 47
All ❌✅ (primary) -2.5% [-4.3%, 3.8%] 41

Cycles

Results (primary -3.1%, secondary -2.4%)

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.9% [0.5%, 1.2%] 2
Improvements ✅
(primary)
-3.1% [-3.6%, -2.4%] 17
Improvements ✅
(secondary)
-2.8% [-5.3%, -0.4%] 20
All ❌✅ (primary) -3.1% [-3.6%, -2.4%] 17

Binary size

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

Bootstrap: 462.15s -> 462.854s (0.15%)
Artifact size: 405.59 MiB -> 406.55 MiB (0.24%)

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage 097c129 88ca14e 46d6fbe b0122f6

@rust-timer

rust-timer commented Nov 28, 2026 •

Copy link
Copy Markdown
Running triage with 27 benchmarks

Triage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
For this rollup, these benchmarks are:

  • await-call-tree
  • bitmaps-3.2.1
  • cargo-0.87.1
  • clap_derive-4.5.32
  • clap_derive-4.5.32-nll
  • cranelift-codegen-0.119.0
  • deeply-nested-multi
  • deeply-nested-multi-new-solver
  • eza-0.21.2
  • html5ever-0.31.0
  • html5ever-0.31.0-new-solver
  • hyper-1.6.0
  • image-0.25.6
  • issue-46449
  • issue-88862
  • large-workspace
  • projection-caching
  • regex-automata-0.4.8
  • regression-31157
  • ripgrep-14.1.1
  • ripgrep-14.1.1-nll
  • serde-1.0.219
  • serde_derive-1.0.219
  • syn-2.0.101
  • syn-2.0.101-new-solver
  • tokio-1.53.1
  • tt-muncher

#166655 097c129 Submodule update of rustc-perf

Queued 097c129 with parent b61bfe5, future comparison URL.
There are currently 0 preceding artifacts in the queue.
It will probably take at least ~0.4 hours until the benchmark run finishes.


#163910 88ca14e debugger: stabilize trim-paths unremap file loading

This perf run didn't have relevant results for the `instruction count` metric.

Instruction count

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

Max RSS (memory usage)

Results (primary 3.4%)

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

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

Cycles

Results (secondary -2.0%)

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

Binary size

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


#163895 46d6fbe Stabilize --remap-path-scope in rustdoc and the documentation scope

This perf run didn't have relevant results for the `instruction count` metric.

Instruction count

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

Max RSS (memory usage)

Results (primary 2.0%)

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

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

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.


#166377 b0122f6 fix: ignore format literal source availability in stable hashes

Queued b0122f6 with parent b61bfe5, future comparison URL.
There are currently 2 preceding artifacts in the queue.
It will probably take at least ~1.1 hours until the benchmark run finishes.

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rc Area: `Rc` and `Arc` A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants