]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/lint/builtin.rs
When picking a candidate, consider the unstable ones last.
[rust.git] / src / librustc / lint / builtin.rs
index b4ed9c269bd88334535b2b443c68b6206932f8cb..97cfcf0f60795a07080b82d196a545aee8e14db9 100644 (file)
     "floating-point literals cannot be used in patterns"
 }
 
+declare_lint! {
+    pub UNSTABLE_NAME_COLLISION,
+    Warn,
+    "detects name collision with an existing but unstable method"
+}
+
 /// Does nothing as a lint pass, but registers some `Lint`s
 /// which are used by other parts of the compiler.
 #[derive(Copy, Clone)]
@@ -307,7 +313,8 @@ fn get_lints(&self) -> LintArray {
             SINGLE_USE_LIFETIME,
             TYVAR_BEHIND_RAW_POINTER,
             ELIDED_LIFETIME_IN_PATH,
-            BARE_TRAIT_OBJECT
+            BARE_TRAIT_OBJECT,
+            UNSTABLE_NAME_COLLISION,
         )
     }
 }