summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/create_dir.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/create_dir.txt')
-rw-r--r--src/tools/clippy/src/docs/create_dir.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/create_dir.txt b/src/tools/clippy/src/docs/create_dir.txt
new file mode 100644
index 000000000..e4e793768
--- /dev/null
+++ b/src/tools/clippy/src/docs/create_dir.txt
@@ -0,0 +1,15 @@
+### What it does
+Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead.
+
+### Why is this bad?
+Sometimes `std::fs::create_dir` is mistakenly chosen over `std::fs::create_dir_all`.
+
+### Example
+```
+std::fs::create_dir("foo");
+```
+
+Use instead:
+```
+std::fs::create_dir_all("foo");
+``` \ No newline at end of file