Skip to content

Conversation

smirzaei
Copy link
Contributor

@smirzaei smirzaei commented Sep 7, 2025

This PR adds the missing error documentation for both Path.canonicalize and PathBuf.canonicalize methods. Since both methods are wappers around fs::canonicalize, the error doc is copied directly from that function.

This makes it faster to find what errors might arise when calling path.canonicalize or path_buf.canonicalize in the editor itself without needing to drill down to the fs::canonicalzie docs.

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 7, 2025
@jhpratt
Copy link
Member

jhpratt commented Sep 7, 2025

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 7, 2025

📌 Commit 4b5d0e0 has been approved by jhpratt

It is now in the queue for this repository.

@bors bors 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 7, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 8, 2025
…lize-docs, r=jhpratt

docs(std): add error docs for path canonicalize

This PR adds the missing error documentation for both [Path.canonicalize](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize) and [PathBuf.canonicalize](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.canonicalize) methods. Since both methods are wappers around [fs::canonicalize](https://doc.rust-lang.org/std/fs/fn.canonicalize.html), the error doc is copied directly from that function.

This makes it faster to find what errors might arise when calling `path.canonicalize` or `path_buf.canonicalize` in the editor itself without needing to drill down to the  `fs::canonicalzie` docs.
bors added a commit that referenced this pull request Sep 8, 2025
Rollup of 5 pull requests

Successful merges:

 - #144549 (match clang's `va_arg` assembly on arm targets)
 - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
 - #146298 (GVN: Ensure indirect is first projection in try_as_place.)
 - #146299 (docs(std): add error docs for path canonicalize)
 - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 8, 2025
Rollup of 7 pull requests

Successful merges:

 - #146111 (Migrate more things in the new solver to specific `DefId`s)
 - #146298 (GVN: Ensure indirect is first projection in try_as_place.)
 - #146299 (docs(std): add error docs for path canonicalize)
 - #146310 (Allow static regions in `type_name`.)
 - #146313 (Some `rustc_middle` cleanups)
 - #146319 (Fix typo in default.rs)
 - #146320 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d1ab870 into rust-lang:master Sep 8, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 8, 2025
rust-timer added a commit that referenced this pull request Sep 8, 2025
Rollup merge of #146299 - smirzaei:doc/improve-path-canonicalize-docs, r=jhpratt

docs(std): add error docs for path canonicalize

This PR adds the missing error documentation for both [Path.canonicalize](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize) and [PathBuf.canonicalize](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.canonicalize) methods. Since both methods are wappers around [fs::canonicalize](https://doc.rust-lang.org/std/fs/fn.canonicalize.html), the error doc is copied directly from that function.

This makes it faster to find what errors might arise when calling `path.canonicalize` or `path_buf.canonicalize` in the editor itself without needing to drill down to the  `fs::canonicalzie` docs.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 10, 2025
…lize-docs, r=jhpratt

docs(std): add error docs for path canonicalize

This PR adds the missing error documentation for both [Path.canonicalize](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize) and [PathBuf.canonicalize](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.canonicalize) methods. Since both methods are wappers around [fs::canonicalize](https://doc.rust-lang.org/std/fs/fn.canonicalize.html), the error doc is copied directly from that function.

This makes it faster to find what errors might arise when calling `path.canonicalize` or `path_buf.canonicalize` in the editor itself without needing to drill down to the  `fs::canonicalzie` docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants