mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Add register_internals function to rustc_lint
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
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 @@ macro_rules! register_passes {
|
||||
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),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user