summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/items_after_statements.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/src/docs/items_after_statements.txt37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/tools/clippy/src/docs/items_after_statements.txt b/src/tools/clippy/src/docs/items_after_statements.txt
deleted file mode 100644
index 6fdfff50d..000000000
--- a/src/tools/clippy/src/docs/items_after_statements.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-### What it does
-Checks for items declared after some statement in a block.
-
-### Why is this bad?
-Items live for the entire scope they are declared
-in. But statements are processed in order. This might cause confusion as
-it's hard to figure out which item is meant in a statement.
-
-### Example
-```
-fn foo() {
- println!("cake");
-}
-
-fn main() {
- foo(); // prints "foo"
- fn foo() {
- println!("foo");
- }
- foo(); // prints "foo"
-}
-```
-
-Use instead:
-```
-fn foo() {
- println!("cake");
-}
-
-fn main() {
- fn foo() {
- println!("foo");
- }
- foo(); // prints "foo"
- foo(); // prints "foo"
-}
-``` \ No newline at end of file