about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2018-12-06 14:03:12 +0100
committerflip1995 <hello@philkrones.com>2019-04-03 18:22:18 +0200
commita2a8c441068bc73bc37ccec03bfefed2ef9ff054 (patch)
treec622f071232cb2991342bd44170d15ec701475b9 /src
parent4c9fb9361a2a81745e735790450bb2b653b7c279 (diff)
downloadrust-a2a8c441068bc73bc37ccec03bfefed2ef9ff054.tar.gz
rust-a2a8c441068bc73bc37ccec03bfefed2ef9ff054.zip
Add register_internals function to `rustc_lint`
Diffstat (limited to 'src')
-rw-r--r--src/librustc_lint/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index c9301a32d83..f741f37594e 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -61,6 +61,7 @@ use nonstandard_style::*;
 use builtin::*;
 use types::*;
 use unused::*;
+use rustc::lint::internal::*;
 
 /// Useful for other parts of the compiler.
 pub use builtin::SoftLints;
@@ -488,3 +489,18 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
     store.register_removed("bad_repr",
         "replaced with a generic attribute input check");
 }
+
+pub fn register_internals(store: &mut lint::LintStore, sess: Option<&Session>) {
+    store.register_early_pass(sess, false, false, box DefaultHashTypes::new());
+    store.register_late_pass(sess, false, false, false, box TyKindUsage);
+    store.register_group(
+        sess,
+        false,
+        "internal",
+        None,
+        vec![
+            LintId::of(DEFAULT_HASH_TYPES),
+            LintId::of(USAGE_OF_TY_TYKIND),
+        ],
+    );
+}