Accept LocalDefId
as key for lint_mod
query
This commit is contained in:
parent
9e3bb615d5
commit
49d0b727ea
@ -56,7 +56,7 @@ mod unused;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::builtin::{
|
||||
@ -90,12 +90,8 @@ pub fn provide(providers: &mut Providers<'_>) {
|
||||
*providers = Providers { lint_mod, ..*providers };
|
||||
}
|
||||
|
||||
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: DefId) {
|
||||
late::late_lint_mod(
|
||||
tcx,
|
||||
module_def_id.expect_local(),
|
||||
BuiltinCombinedModuleLateLintPass::new(),
|
||||
);
|
||||
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
|
||||
late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
|
||||
}
|
||||
|
||||
macro_rules! pre_expansion_lint_passes {
|
||||
|
@ -403,8 +403,8 @@ rustc_queries! {
|
||||
}
|
||||
|
||||
Other {
|
||||
query lint_mod(key: DefId) -> () {
|
||||
desc { |tcx| "linting {}", describe_as_module(key, tcx) }
|
||||
query lint_mod(key: LocalDefId) -> () {
|
||||
desc { |tcx| "linting {}", describe_as_module(key.to_def_id(), tcx) }
|
||||
}
|
||||
|
||||
/// Checks the attributes in the module.
|
||||
|
Loading…
Reference in New Issue
Block a user