]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/src/docs/create_dir.txt
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / src / docs / create_dir.txt
1 ### What it does
2 Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead.
3
4 ### Why is this bad?
5 Sometimes `std::fs::create_dir` is mistakenly chosen over `std::fs::create_dir_all`.
6
7 ### Example
8 ```
9 std::fs::create_dir("foo");
10 ```
11
12 Use instead:
13 ```
14 std::fs::create_dir_all("foo");
15 ```