New never loop lint

This lint detects loops that unconditionally break or return.

Closes #257
This commit is contained in:
Andre Bogus
2017-02-17 04:53:14 +01:00
parent 51931c70b3
commit 505eb53d29
8 changed files with 149 additions and 4 deletions

View File

@@ -405,6 +405,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
loops::FOR_LOOP_OVER_RESULT,
loops::ITER_NEXT_LOOP,
loops::NEEDLESS_RANGE_LOOP,
loops::NEVER_LOOP,
loops::REVERSE_RANGE_LOOP,
loops::UNUSED_COLLECT,
loops::WHILE_LET_LOOP,