Remove six macros relating to lint definitions.
These were enabled by the removal of `-Zno-interleave-lints`.
This commit is contained in:
parent
67cfe2cfbb
commit
99e9c1ddb7
1 changed files with 101 additions and 117 deletions
|
@ -127,16 +127,20 @@ fn lint_mod(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
|
||||||
late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
|
late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! pre_expansion_lint_passes {
|
early_lint_methods!(
|
||||||
($macro:path, $args:tt) => {
|
declare_combined_early_lint_pass,
|
||||||
$macro!($args, [KeywordIdents: KeywordIdents,]);
|
[
|
||||||
};
|
pub BuiltinCombinedPreExpansionLintPass,
|
||||||
}
|
[
|
||||||
|
KeywordIdents: KeywordIdents,
|
||||||
|
]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
macro_rules! early_lint_passes {
|
early_lint_methods!(
|
||||||
($macro:path, $args:tt) => {
|
declare_combined_early_lint_pass,
|
||||||
$macro!(
|
[
|
||||||
$args,
|
pub BuiltinCombinedEarlyLintPass,
|
||||||
[
|
[
|
||||||
UnusedParens: UnusedParens,
|
UnusedParens: UnusedParens,
|
||||||
UnusedBraces: UnusedBraces,
|
UnusedBraces: UnusedBraces,
|
||||||
|
@ -155,23 +159,14 @@ macro_rules! early_lint_passes {
|
||||||
UnusedDocComment: UnusedDocComment,
|
UnusedDocComment: UnusedDocComment,
|
||||||
UnexpectedCfgs: UnexpectedCfgs,
|
UnexpectedCfgs: UnexpectedCfgs,
|
||||||
]
|
]
|
||||||
|
]
|
||||||
);
|
);
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! declare_combined_early_pass {
|
// FIXME: Make a separate lint type which do not require typeck tables
|
||||||
([$name:ident], $passes:tt) => (
|
late_lint_methods!(
|
||||||
early_lint_methods!(declare_combined_early_lint_pass, [pub $name, $passes]);
|
declare_combined_late_lint_pass,
|
||||||
)
|
[
|
||||||
}
|
pub BuiltinCombinedLateLintPass,
|
||||||
|
|
||||||
pre_expansion_lint_passes!(declare_combined_early_pass, [BuiltinCombinedPreExpansionLintPass]);
|
|
||||||
early_lint_passes!(declare_combined_early_pass, [BuiltinCombinedEarlyLintPass]);
|
|
||||||
|
|
||||||
macro_rules! late_lint_passes {
|
|
||||||
($macro:path, $args:tt) => {
|
|
||||||
$macro!(
|
|
||||||
$args,
|
|
||||||
[
|
[
|
||||||
// Tracks state across modules
|
// Tracks state across modules
|
||||||
UnnameableTestItems: UnnameableTestItems::new(),
|
UnnameableTestItems: UnnameableTestItems::new(),
|
||||||
|
@ -184,14 +179,14 @@ macro_rules! late_lint_passes {
|
||||||
// Keeps a global list of foreign declarations.
|
// Keeps a global list of foreign declarations.
|
||||||
ClashingExternDeclarations: ClashingExternDeclarations::new(),
|
ClashingExternDeclarations: ClashingExternDeclarations::new(),
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
['tcx]
|
||||||
);
|
);
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! late_lint_mod_passes {
|
late_lint_methods!(
|
||||||
($macro:path, $args:tt) => {
|
declare_combined_late_lint_pass,
|
||||||
$macro!(
|
[
|
||||||
$args,
|
BuiltinCombinedModuleLateLintPass,
|
||||||
[
|
[
|
||||||
ForLoopsOverFallibles: ForLoopsOverFallibles,
|
ForLoopsOverFallibles: ForLoopsOverFallibles,
|
||||||
DerefIntoDynSupertrait: DerefIntoDynSupertrait,
|
DerefIntoDynSupertrait: DerefIntoDynSupertrait,
|
||||||
|
@ -234,20 +229,9 @@ macro_rules! late_lint_mod_passes {
|
||||||
NamedAsmLabels: NamedAsmLabels,
|
NamedAsmLabels: NamedAsmLabels,
|
||||||
OpaqueHiddenInferredBound: OpaqueHiddenInferredBound,
|
OpaqueHiddenInferredBound: OpaqueHiddenInferredBound,
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
['tcx]
|
||||||
);
|
);
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! declare_combined_late_pass {
|
|
||||||
([$v:vis $name:ident], $passes:tt) => (
|
|
||||||
late_lint_methods!(declare_combined_late_lint_pass, [$v $name, $passes], ['tcx]);
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: Make a separate lint type which do not require typeck tables
|
|
||||||
late_lint_passes!(declare_combined_late_pass, [pub BuiltinCombinedLateLintPass]);
|
|
||||||
|
|
||||||
late_lint_mod_passes!(declare_combined_late_pass, [BuiltinCombinedModuleLateLintPass]);
|
|
||||||
|
|
||||||
pub fn new_lint_store(internal_lints: bool) -> LintStore {
|
pub fn new_lint_store(internal_lints: bool) -> LintStore {
|
||||||
let mut lint_store = LintStore::new();
|
let mut lint_store = LintStore::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue