Add register_internals function to rustc_lint

This commit is contained in:
flip1995 2018-12-06 14:03:12 +01:00
parent 4c9fb9361a
commit a2a8c44106
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -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),
],
);
}