Skip to content

Commit a2a8c44

Browse files
committed
Add register_internals function to rustc_lint
1 parent 4c9fb93 commit a2a8c44

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/librustc_lint/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ use nonstandard_style::*;
6161
use builtin::*;
6262
use types::*;
6363
use unused::*;
64+
use rustc::lint::internal::*;
6465

6566
/// Useful for other parts of the compiler.
6667
pub use builtin::SoftLints;
@@ -488,3 +489,18 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
488489
store.register_removed("bad_repr",
489490
"replaced with a generic attribute input check");
490491
}
492+
493+
pub fn register_internals(store: &mut lint::LintStore, sess: Option<&Session>) {
494+
store.register_early_pass(sess, false, false, box DefaultHashTypes::new());
495+
store.register_late_pass(sess, false, false, false, box TyKindUsage);
496+
store.register_group(
497+
sess,
498+
false,
499+
"internal",
500+
None,
501+
vec![
502+
LintId::of(DEFAULT_HASH_TYPES),
503+
LintId::of(USAGE_OF_TY_TYKIND),
504+
],
505+
);
506+
}

0 commit comments

Comments
 (0)