File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ mod unused;
56
56
57
57
use rustc_ast:: ast;
58
58
use rustc_hir as hir;
59
- use rustc_hir:: def_id:: DefId ;
59
+ use rustc_hir:: def_id:: LocalDefId ;
60
60
use rustc_middle:: ty:: query:: Providers ;
61
61
use rustc_middle:: ty:: TyCtxt ;
62
62
use rustc_session:: lint:: builtin:: {
@@ -90,12 +90,8 @@ pub fn provide(providers: &mut Providers<'_>) {
90
90
* providers = Providers { lint_mod, ..* providers } ;
91
91
}
92
92
93
- fn lint_mod ( tcx : TyCtxt < ' _ > , module_def_id : DefId ) {
94
- late:: late_lint_mod (
95
- tcx,
96
- module_def_id. expect_local ( ) ,
97
- BuiltinCombinedModuleLateLintPass :: new ( ) ,
98
- ) ;
93
+ fn lint_mod ( tcx : TyCtxt < ' _ > , module_def_id : LocalDefId ) {
94
+ late:: late_lint_mod ( tcx, module_def_id, BuiltinCombinedModuleLateLintPass :: new ( ) ) ;
99
95
}
100
96
101
97
macro_rules! pre_expansion_lint_passes {
Original file line number Diff line number Diff line change @@ -403,8 +403,8 @@ rustc_queries! {
403
403
}
404
404
405
405
Other {
406
- query lint_mod( key: DefId ) -> ( ) {
407
- desc { |tcx| "linting {}" , describe_as_module( key, tcx) }
406
+ query lint_mod( key: LocalDefId ) -> ( ) {
407
+ desc { |tcx| "linting {}" , describe_as_module( key. to_def_id ( ) , tcx) }
408
408
}
409
409
410
410
/// Checks the attributes in the module.
You can’t perform that action at this time.
0 commit comments