Rollup merge of #114772 - fee1-dead-contrib:typed-did, r=b-naber
Add `{Local}ModDefId` to more strongly type DefIds` Based on #110862 by `@Nilstrieb`
This commit is contained in:
commit
f0987ab45b
27 changed files with 324 additions and 100 deletions
|
@ -19,7 +19,7 @@ use rustc_ast as ast;
|
|||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_data_structures::sync::join;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
|
||||
use rustc_hir::intravisit as hir_visit;
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
|
@ -338,7 +338,7 @@ crate::late_lint_methods!(impl_late_lint_pass, []);
|
|||
|
||||
pub fn late_lint_mod<'tcx, T: LateLintPass<'tcx> + 'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
module_def_id: LocalDefId,
|
||||
module_def_id: LocalModDefId,
|
||||
builtin_lints: T,
|
||||
) {
|
||||
let context = LateContext {
|
||||
|
@ -369,7 +369,7 @@ pub fn late_lint_mod<'tcx, T: LateLintPass<'tcx> + 'tcx>(
|
|||
|
||||
fn late_lint_mod_inner<'tcx, T: LateLintPass<'tcx>>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
module_def_id: LocalDefId,
|
||||
module_def_id: LocalModDefId,
|
||||
context: LateContext<'tcx>,
|
||||
pass: T,
|
||||
) {
|
||||
|
|
|
@ -90,7 +90,7 @@ use rustc_ast as ast;
|
|||
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
|
||||
use rustc_fluent_macro::fluent_messages;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::builtin::{
|
||||
|
@ -145,7 +145,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
*providers = Providers { lint_mod, ..*providers };
|
||||
}
|
||||
|
||||
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
|
||||
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
|
||||
late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue