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;
5656
5757use rustc_ast:: ast;
5858use rustc_hir as hir;
59- use rustc_hir:: def_id:: DefId ;
59+ use rustc_hir:: def_id:: LocalDefId ;
6060use rustc_middle:: ty:: query:: Providers ;
6161use rustc_middle:: ty:: TyCtxt ;
6262use rustc_session:: lint:: builtin:: {
@@ -90,12 +90,8 @@ pub fn provide(providers: &mut Providers<'_>) {
9090 * providers = Providers { lint_mod, ..* providers } ;
9191}
9292
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 ( ) ) ;
9995}
10096
10197macro_rules! pre_expansion_lint_passes {
Original file line number Diff line number Diff line change @@ -403,8 +403,8 @@ rustc_queries! {
403403 }
404404
405405 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) }
408408 }
409409
410410 /// Checks the attributes in the module.
You can’t perform that action at this time.
0 commit comments