Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::fs::write should document that it doesn't create directories #97947

Closed
Lokathor opened this issue Jun 10, 2022 · 0 comments · Fixed by #98662
Closed

std::fs::write should document that it doesn't create directories #97947

Lokathor opened this issue Jun 10, 2022 · 0 comments · Fixed by #98662
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools

Comments

@Lokathor
Copy link
Contributor

The docs for std::fs::write state that the target file will be made if it doesn't exist. However, at least on linux, if the directory path leading to the target file does not exist then the call will fail rather than first creating the necessary folders and then creating the file.

This is not strictly speaking wrong, but should likely be at least documented.

@GuillaumeGomez GuillaumeGomez added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Jun 17, 2022
LucasDumont added a commit to LucasDumont/rust that referenced this issue Jul 11, 2022
As mentioned in rust-lang#97947, the documentation is updated
JohnTitor added a commit to JohnTitor/rust that referenced this issue Jul 16, 2022
…omcc

Add std::fs::write documentation precision

Fixes rust-lang#97947.

As mentioned in rust-lang#97947, the documentation is updated
@bors bors closed this as completed in 06eb90e Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants