Skip to content

Add precision for create_dir function #55621

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

GuillaumeGomez
Copy link
Member

Took me a while to find the other equivalent so it seems to be necessary.

r? @QuietMisdreavus

@GuillaumeGomez
Copy link
Member Author

Thanks for the polishing @QuietMisdreavus! Updated.

@QuietMisdreavus
Copy link
Member

Oh hey, looking again, there's a perfectly usable "Errors" section that already exists, right below the note you added! How about adding this to that list instead?

- A parent directory does not exist. To create a directory and all its parent directories at the same time, use [`create_dir_all`].

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Nov 3, 2018

Ah sure. The problem is that it looks exactly like the create_dir_all docs. I wanted to make it stand out. I can add both if you prefer?

@QuietMisdreavus
Copy link
Member

"Looking the same as the other docs" is the point. If we have the note somewhere, people will be able to find it. I don't want to have two different sections that describe when a function returns an error; the one you're adding is just redundant. We have a perfectly serviceable documentation standard when describing the situations where a function returns an error, please use it.

@GuillaumeGomez
Copy link
Member Author

Added it to the error list.

@QuietMisdreavus
Copy link
Member

The other note is still there, but looking at it again, i think it's probably fine to leave it. If it seems redundant to enough other people, we can take it out later. Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 5, 2018

📌 Commit 424fecd has been approved by QuietMisdreavus

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 5, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Nov 6, 2018
…isdreavus

Add precision for create_dir function

Took me a while to find the other equivalent so it seems to be necessary.

r? @QuietMisdreavus
bors added a commit that referenced this pull request Nov 6, 2018
Rollup of 11 pull requests

Successful merges:

 - #55490 (resolve: Fix ICE in macro import error recovery)
 - #55597 (std: Enable usage of `thread_local!` through imports)
 - #55601 (Fix tracking issue numbers for some unstable features)
 - #55621 (Add precision for create_dir function)
 - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux)
 - #55664 (Make "all possible cases" help message uniform with existing help messages)
 - #55689 (miri: binary_op_val -> binary_op_imm)
 - #55694 (Fixes #31076)
 - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields)
 - #55700 (Update ui tests with respect to NLL)
 - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
@bors bors merged commit 424fecd into rust-lang:master Nov 6, 2018
@GuillaumeGomez GuillaumeGomez deleted the create-dir branch November 6, 2018 15:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants