clarify documentation of remove_dir errors#75324
Conversation
remove_dir will error if the path doesn't exist or isn't a directory. It's useful to clarify that this is "remove dir or fail" not "remove dir if it exists". I don't think this belongs in the title. "Removes an existing, empty directory" is strangely worded-- there's no such thing as a non-existing directory. Better to just say explicitly it will return an error.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @shepmaster (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
Note: a similar change was recently added to the docs for remove_file (see c4e44d7). I think the two should be consistent about documenting the "doesn't exist" case. |
|
This PR is inactive for a week or so, let's r? @Mark-Simulacrum, I think it's good to go. |
|
@bors r=JohnTitor rollup |
|
📌 Commit f85d231 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#75324 (clarify documentation of remove_dir errors) - rust-lang#75532 (Fix RFC-1014 test) - rust-lang#75664 (Update mailmap for mati865) - rust-lang#75727 (Switch to intra-doc links in `core::result`) - rust-lang#75750 (Move to intra doc links for std::thread documentation) Failed merges: r? @ghost
remove_dir will error if the path doesn't exist or isn't a directory.
It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".
I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory. Better to just say explicitly it will return an error.