rustbot · GitHub

@weihanglo

epage

epage

epage

epage

Split remap rule logic into its `(<from>, <to>)` pair as return values.
This is meant to be used in unremap file generation.

@weihanglo

@weihanglo

This implements the unremap file discussed in 2026 All-Hands.
The logic basically follows the unstable SBOM file generation.
See <rust-lang/all-hands-2026#38 (comment)>
for the concept of the unremap file.
See the doc update commit for more about the file format.
An example of the unremap file:
```json
{"v":1}
{"rust_version":"1.96.0-nightly","workspace_root":"/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"}
```

@weihanglo

@epage

Merged via the queue into rust-lang:master with commit cafc91b

Aug 4, 2026

45 of 58 checks passed

This was referenced

Aug 4, 2026

Merged

Open

Closed

rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request

Aug 5, 2026

@weihanglo

@Urgau Urgau mentioned this pull request

Aug 5, 2026

Merged

rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request

Aug 6, 2026

pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request

Aug 8, 2026

jhpratt added a commit to jhpratt/rust that referenced this pull request

Aug 9, 2026
…rk-Simulacrum
Add nightly-only support for Cargo unremap trim-paths files in `rust-gdb`
This PR adds support in `rust-gdb` for the un-remapping file produced by Cargo with `-Ztrim-paths` (rust-lang/cargo#17303). This support is nightly-only, and only activated when `RUST_GDB_TRIM_PATHS=unstable` is set.
An example of the unremap file:
```json
{"v":1}
{"rust_version":"1.96.0-nightly","workspace_root":"/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"}
```

jhpratt added a commit to jhpratt/rust that referenced this pull request

Aug 10, 2026
…rk-Simulacrum
Add nightly-only support for Cargo unremap trim-paths files in `rust-gdb`
This PR adds support in `rust-gdb` for the un-remapping file produced by Cargo with `-Ztrim-paths` (rust-lang/cargo#17303). This support is nightly-only, and only activated when `RUST_GDB_TRIM_PATHS=unstable` is set.
An example of the unremap file:
```json
{"v":1}
{"rust_version":"1.96.0-nightly","workspace_root":"/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"}
```

github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request

Aug 10, 2026

github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request

Aug 10, 2026

rust-timer added a commit to rust-lang/rust that referenced this pull request

Aug 10, 2026
Rollup merge of #160560 - Urgau:trim-paths-gdb-support, r=Mark-Simulacrum
Add nightly-only support for Cargo unremap trim-paths files in `rust-gdb`
This PR adds support in `rust-gdb` for the un-remapping file produced by Cargo with `-Ztrim-paths` (rust-lang/cargo#17303). This support is nightly-only, and only activated when `RUST_GDB_TRIM_PATHS=unstable` is set.
An example of the unremap file:
```json
{"v":1}
{"rust_version":"1.96.0-nightly","workspace_root":"/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"}
```

@Urgau Urgau mentioned this pull request

Aug 10, 2026

Open

Merged

pull Bot pushed a commit to pepe57/cargo that referenced this pull request

Aug 13, 2026
…ut (rust-lang#17356)
### What does this PR try to resolve?
See rust-lang#17354 (comment)
for the motivating context.
In rust-lang#17303 we started emitting
unremap files to final artifacts.
This included logic for cleaning the unremap file when running `cargo
clean -p` but the logic was not added in the `.build_dir_new_layout`
branch in the cargo clean logic.
This PR adds the logic to both branches.
### How to test and review this PR?
Primarily using the existing tests
r? @weihanglo

renovate-bot pushed a commit to renovate-bot/rust-lang-_-compiler-builtins that referenced this pull request

Aug 17, 2026

lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request

Aug 17, 2026

Read the original on github.com ↗