Add lint checks for unused loop labels

This commit is contained in:
Kyle Stachowicz
2018-05-14 23:32:21 -07:00
parent 952f344cdc
commit d67628e053
6 changed files with 154 additions and 2 deletions

View File

@@ -110,6 +110,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
add_early_builtin_with_new!(sess,
DeprecatedAttr,
UnusedLoopLabel,
);
add_builtin!(sess,
@@ -177,7 +178,8 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
UNUSED_DOC_COMMENT,
UNUSED_EXTERN_CRATES,
UNUSED_FEATURES,
UNUSED_PARENS);
UNUSED_PARENS,
UNUSED_LOOP_LABEL);
add_lint_group!(sess,
"rust_2018_idioms",