summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/else_if_without_else.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/src/docs/else_if_without_else.txt27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/tools/clippy/src/docs/else_if_without_else.txt b/src/tools/clippy/src/docs/else_if_without_else.txt
deleted file mode 100644
index 33f5d0f91..000000000
--- a/src/tools/clippy/src/docs/else_if_without_else.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-### What it does
-Checks for usage of if expressions with an `else if` branch,
-but without a final `else` branch.
-
-### Why is this bad?
-Some coding guidelines require this (e.g., MISRA-C:2004 Rule 14.10).
-
-### Example
-```
-if x.is_positive() {
- a();
-} else if x.is_negative() {
- b();
-}
-```
-
-Use instead:
-
-```
-if x.is_positive() {
- a();
-} else if x.is_negative() {
- b();
-} else {
- // We don't care about zero.
-}
-``` \ No newline at end of file