diff options
Diffstat (limited to 'src/tools/clippy/src/docs/while_immutable_condition.txt')
-rw-r--r-- | src/tools/clippy/src/docs/while_immutable_condition.txt | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/tools/clippy/src/docs/while_immutable_condition.txt b/src/tools/clippy/src/docs/while_immutable_condition.txt deleted file mode 100644 index 71800701f..000000000 --- a/src/tools/clippy/src/docs/while_immutable_condition.txt +++ /dev/null @@ -1,20 +0,0 @@ -### What it does -Checks whether variables used within while loop condition -can be (and are) mutated in the body. - -### Why is this bad? -If the condition is unchanged, entering the body of the loop -will lead to an infinite loop. - -### Known problems -If the `while`-loop is in a closure, the check for mutation of the -condition variables in the body can cause false negatives. For example when only `Upvar` `a` is -in the condition and only `Upvar` `b` gets mutated in the body, the lint will not trigger. - -### Example -``` -let i = 0; -while i > 10 { - println!("let me loop forever!"); -} -```
\ No newline at end of file |