Skip to content

docs(trim-paths): add limitations and polish - #17425

Merged
epage merged 5 commits into
rust-lang:masterfrom
weihanglo:trim-paths-docs
Sep 2, 2026
Merged

docs(trim-paths): add limitations and polish#17425
epage merged 5 commits into
rust-lang:masterfrom
weihanglo:trim-paths-docs

Conversation

@weihanglo

@weihanglo weihanglo commented Sep 2, 2026

Copy link
Copy Markdown
Member

What does this PR try to resolve?

This doc polish is a stabilization preparation.

See #12137 (comment)

How to test and review this PR?

This is stacked on top of #17424 to minimize merge conflict. Please review from c99bbf2

mdbook serve doc/book

@weihanglo weihanglo added the Z-trim-paths Nightly: path sanitization label Sep 2, 2026
@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-profiles Area: profiles S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 2, 2026
@rustbot

rustbot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @epage, @weihanglo
  • @epage, @weihanglo expanded to epage, weihanglo

@weihanglo

Copy link
Copy Markdown
Member Author

cc @Urgau, if you'd also like to take a look. I generally want to mostly refer to rustc docs 😆.

Comment thread doc/book/src/reference/unstable.md Outdated
@rustbot

This comment has been minimized.

@Urgau Urgau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not much to say, this looks good to me as well.

View changes since this review

Comment on lines 1520 to 1527
It takes the following values:

- `"none"` and `false` --- disable path sanitization
- `"macro"` --- sanitize paths in the expansion of `std::file!()` macro.
This is where paths in embedded panic messages come from
- `"diagnostics"` --- sanitize paths in printed compiler diagnostics
- `"object"` --- sanitize paths in compiled executables or libraries
- `"all"` and `true` --- sanitize paths in all possible locations

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this list is intended to be the same as rustc, but if it's the case then it's missing the coverage and debuginfo scopes. If it's intended to diverge, it should maybe be mentioned that it's only a subset.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I avoided touching this right now at this moment as we may want to stabilize a subset.

We are discussing it in #t-cargo > stabilization plan for `-Ztrim-paths` (though no discussions yet)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are discussing it in #t-cargo > stabilization plan for -Ztrim-paths (though no discussions yet)

Replied the in the Zulip thread.

Comment thread doc/book/src/reference/unstable.md
Comment thread doc/book/src/reference/unstable.md Outdated
@rustbot

rustbot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@epage
epage added this pull request to the merge queue Sep 2, 2026
Merged via the queue into rust-lang:master with commit dbc319b Sep 2, 2026
28 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2026
@weihanglo
weihanglo deleted the trim-paths-docs branch September 2, 2026 20:15
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Sep 5, 2026
Update cargo submodule

9 commits in b2e9d5f9db3fb1c454ab84f10c16508984a266e2..3c0b534756e166d12eb9fd2e1abfe5b42ac6101e
2026-09-02 14:49:16 +0000 to 2026-09-04 17:03:10 +0000
- fix(trim-paths)!: limit options to `none|object|all` (rust-lang/cargo#17432)
- fix(git): Apply pr hint to git-fetch-with-cli (rust-lang/cargo#17437)
- fix(git): Make PR dep note cloer to our style guide (rust-lang/cargo#17436)
- docs: clarify cargo vendor source config option (rust-lang/cargo#17435)
- docs(trim-paths): workspace remap begins with `.` (rust-lang/cargo#17433)
- docs: Switch from "target triple" to "target tuple" (rust-lang/cargo#17430)
- docs(trim-paths): add limitations and polish (rust-lang/cargo#17425)
- fix(git): Simplify error message (rust-lang/cargo#17429)
- chore(deps): update rust crate base64 to 0.23.0 (rust-lang/cargo#17418)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Sep 5, 2026
Update cargo submodule

9 commits in b2e9d5f9db3fb1c454ab84f10c16508984a266e2..3c0b534756e166d12eb9fd2e1abfe5b42ac6101e
2026-09-02 14:49:16 +0000 to 2026-09-04 17:03:10 +0000
- fix(trim-paths)!: limit options to `none|object|all` (rust-lang/cargo#17432)
- fix(git): Apply pr hint to git-fetch-with-cli (rust-lang/cargo#17437)
- fix(git): Make PR dep note cloer to our style guide (rust-lang/cargo#17436)
- docs: clarify cargo vendor source config option (rust-lang/cargo#17435)
- docs(trim-paths): workspace remap begins with `.` (rust-lang/cargo#17433)
- docs: Switch from "target triple" to "target tuple" (rust-lang/cargo#17430)
- docs(trim-paths): add limitations and polish (rust-lang/cargo#17425)
- fix(git): Simplify error message (rust-lang/cargo#17429)
- chore(deps): update rust crate base64 to 0.23.0 (rust-lang/cargo#17418)
@rustbot rustbot added this to the 1.100.0 milestone Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-documenting-cargo-itself Area: Cargo's documentation A-profiles Area: profiles Z-trim-paths Nightly: path sanitization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants