From 1349272a6e0f923da21b81414ad2a92f2cbbeda9 Mon Sep 17 00:00:00 2001 From: marmeladema Date: Sat, 18 Apr 2020 17:12:02 +0100 Subject: [PATCH] Accept `LocalDefId` as key for `check_impl_item_well_formed` query --- src/librustc_middle/query/mod.rs | 4 +++- src/librustc_typeck/check/mod.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustc_middle/query/mod.rs b/src/librustc_middle/query/mod.rs index 68fe36d4454f2..c3e023f40299e 100644 --- a/src/librustc_middle/query/mod.rs +++ b/src/librustc_middle/query/mod.rs @@ -810,7 +810,9 @@ rustc_queries! { query check_trait_item_well_formed(key: LocalDefId) -> () { desc { |tcx| "processing `{}`", tcx.def_path_str(key.to_def_id()) } } - query check_impl_item_well_formed(_: DefId) -> () {} + query check_impl_item_well_formed(key: LocalDefId) -> () { + desc { |tcx| "processing `{}`", tcx.def_path_str(key.to_def_id()) } + } } Linking { diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index ccce1f1d34e62..5877c6d269ad6 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -762,8 +762,8 @@ fn check_trait_item_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) { wfcheck::check_trait_item(tcx, def_id); } -fn check_impl_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { - wfcheck::check_impl_item(tcx, def_id.expect_local()); +fn check_impl_item_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) { + wfcheck::check_impl_item(tcx, def_id); } pub fn provide(providers: &mut Providers<'_>) {