Add note about absolute paths to Path::join#107114
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) soon. Please see the contribution instructions for more information. |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
@rustbot label +A-docs |
|
Can you also add an example in the example snippet? Something like assert_eq!(Path::new("/etc").join("/bin/sh"), PathBuf::from("/bin/sh")); |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Thanks! @bors r+ |
…n, r=m-ou-se Add note about absolute paths to Path::join The note already exists on `PathBuf::push`, but I think it is good to have it on `Path::join` as well since it can cause issues if you are not careful with your input.
…n, r=m-ou-se Add note about absolute paths to Path::join The note already exists on `PathBuf::push`, but I think it is good to have it on `Path::join` as well since it can cause issues if you are not careful with your input.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107102 (Implement some more predicates in the new solver) - rust-lang#107111 (Fix missing arguments issues and copy-paste bug for fluent) - rust-lang#107114 (Add note about absolute paths to Path::join) - rust-lang#107127 (Enable sanitizers for s390x-linux) - rust-lang#107152 (Migrate scraped-examples top and bottom "borders" to CSS variables) - rust-lang#107170 (Add myself to .mailmap) - rust-lang#107174 (rustdoc: Use `DefId(Map,Set)` instead of `FxHash(Map,Set)`) - rust-lang#107180 (Remove unnecessary `&format!`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The note already exists on
PathBuf::push, but I think it is good to have it onPath::joinas well since it can cause issues if you are not careful with your input.