]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/lint/builtin.rs
Auto merge of #50763 - KyleStach1678:unused-loop-label, r=petrochenkov
[rust.git] / src / librustc / lint / builtin.rs
index e5b8e5f0eb9a89043883872bf16acf42b2721713..ac2fa8515bc1d1a836231592e63aea784f379be4 100644 (file)
     "detects name collision with an existing but unstable method"
 }
 
+declare_lint! {
+    pub UNUSED_LABELS,
+    Allow,
+    "detects labels that are never used"
+}
+
 /// Does nothing as a lint pass, but registers some `Lint`s
 /// which are used by other parts of the compiler.
 #[derive(Copy, Clone)]
@@ -318,6 +324,7 @@ fn get_lints(&self) -> LintArray {
             UNUSED_MUT,
             SINGLE_USE_LIFETIME,
             UNUSED_LIFETIME,
+            UNUSED_LABELS,
             TYVAR_BEHIND_RAW_POINTER,
             ELIDED_LIFETIME_IN_PATH,
             BARE_TRAIT_OBJECT,