summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/negative_feature_names.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/negative_feature_names.txt')
-rw-r--r--src/tools/clippy/src/docs/negative_feature_names.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/negative_feature_names.txt b/src/tools/clippy/src/docs/negative_feature_names.txt
new file mode 100644
index 000000000..01ee9efb3
--- /dev/null
+++ b/src/tools/clippy/src/docs/negative_feature_names.txt
@@ -0,0 +1,22 @@
+### What it does
+Checks for negative feature names with prefix `no-` or `not-`
+
+### Why is this bad?
+Features are supposed to be additive, and negatively-named features violate it.
+
+### Example
+```
+[features]
+default = []
+no-abc = []
+not-def = []
+
+```
+Use instead:
+```
+[features]
+default = ["abc", "def"]
+abc = []
+def = []
+
+``` \ No newline at end of file