mcarton
c8986b4676
Fix FP with WHILE_LET_ON_ITERATOR
and refutable pats
2016-09-16 15:50:35 +02:00
mcarton
836554387a
Fix FP with WHILE_LET_LOOP
and break expressions
2016-06-16 16:21:11 +02:00
mcarton
1f419a2986
Add missing suggestions and help message to tests
2016-06-07 18:33:24 +02:00
mcarton
5fadfb3ea6
Fix wrong suggestion in WHILE_LET_LOOP
...
Ok, I lied in the title. This basically *removes* the problematic part
but:
1) it was ugly with big bodies;
2) it was not indented properly;
3) it wasn’t very smart (see #675 ).
2016-02-28 12:09:28 +01:00
mcarton
783437eef0
Use span_suggestion
in loops lints
2016-02-24 20:54:35 +01:00
Oliver Schneider
617c820e6b
compute cyclomatic complexity (adjusted to not punish Rust's match
)
2015-12-03 16:41:55 +01:00
Manish Goregaokar
140c34f85e
Tests shouldn't be executable ( fixes #444 )
2015-11-09 08:49:20 +05:30
Florian Hartwig
5ca7ebb6d2
Fix false positives when iterator variable is used after the loop
2015-10-26 23:57:55 +01:00
Florian Hartwig
8626ac1fd4
Fixes for code review comments
...
* remove weird infinite loops from compile-tests
* remove call to Option::unwrap
* in the lint message, show while-let loop rewritten as for loop
2015-10-26 23:57:55 +01:00
Florian Hartwig
659e7c1d5e
Don't suggest using a for loop if the iterator is used in the loop body
...
Due to https://github.com/rust-lang/rust/issues/8372 , we have to use while-let
in these cases.
2015-10-26 23:57:55 +01:00
Florian Hartwig
f6163fce61
Suggest for loop instead of while-let when looping over iterators
2015-10-26 23:57:50 +01:00
Andre Bogus
b3d035d252
Merge PR #374
2015-10-14 11:44:09 +02:00
Andre Bogus
bed29a017b
new lint to detect
2015-10-13 18:38:08 +05:30
Ravi Shankar
fb5fdb61fa
whup the while_let_loop for ignoring expressions!
2015-10-12 19:12:59 +05:30
Manish Goregaokar
431c391818
Fix a panic caused by while let
2015-10-02 13:37:41 +05:30
Ravi Shankar
185da55263
extending while_let to warn for more statements
2015-09-29 20:26:34 +05:30
Georg Brandl
b72ef5a173
new lint: loop-match-break, which could be while-let ( fixes #118 )
2015-08-30 12:40:39 +02:00