From d9e5fa15ff0582acdcabf2f76a5a48937797b9e0 Mon Sep 17 00:00:00 2001 From: marmeladema Date: Sat, 18 Apr 2020 17:08:30 +0100 Subject: [PATCH] Accept `LocalDefId` as key for `check_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 654b13648d0..0c607a99dfd 100644 --- a/src/librustc_middle/query/mod.rs +++ b/src/librustc_middle/query/mod.rs @@ -804,7 +804,9 @@ rustc_queries! { TypeChecking { query impl_defaultness(_: DefId) -> hir::Defaultness {} - query check_item_well_formed(_: DefId) -> () {} + query check_item_well_formed(key: LocalDefId) -> () { + desc { |tcx| "processing `{}`", tcx.def_path_str(key.to_def_id()) } + } query check_trait_item_well_formed(_: DefId) -> () {} query check_impl_item_well_formed(_: DefId) -> () {} } diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 5f49b5ce9ea..f4001fd238e 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -754,8 +754,8 @@ fn typeck_item_bodies(tcx: TyCtxt<'_>, crate_num: CrateNum) { }); } -fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) { - wfcheck::check_item_well_formed(tcx, def_id.expect_local()); +fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) { + wfcheck::check_item_well_formed(tcx, def_id); } fn check_trait_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) {