summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/nonsensical_open_options.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/src/docs/nonsensical_open_options.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/nonsensical_open_options.txt b/src/tools/clippy/src/docs/nonsensical_open_options.txt
new file mode 100644
index 000000000..7a95443b5
--- /dev/null
+++ b/src/tools/clippy/src/docs/nonsensical_open_options.txt
@@ -0,0 +1,14 @@
+### What it does
+Checks for duplicate open options as well as combinations
+that make no sense.
+
+### Why is this bad?
+In the best case, the code will be harder to read than
+necessary. I don't know the worst case.
+
+### Example
+```
+use std::fs::OpenOptions;
+
+OpenOptions::new().read(true).truncate(true);
+``` \ No newline at end of file