Skip to content

Commit d9e5fa1

Browse files
committed
Accept LocalDefId as key for check_item_well_formed query
1 parent c9f6ffc commit d9e5fa1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/librustc_middle/query/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,9 @@ rustc_queries! {
804804
TypeChecking {
805805
query impl_defaultness(_: DefId) -> hir::Defaultness {}
806806

807-
query check_item_well_formed(_: DefId) -> () {}
807+
query check_item_well_formed(key: LocalDefId) -> () {
808+
desc { |tcx| "processing `{}`", tcx.def_path_str(key.to_def_id()) }
809+
}
808810
query check_trait_item_well_formed(_: DefId) -> () {}
809811
query check_impl_item_well_formed(_: DefId) -> () {}
810812
}

src/librustc_typeck/check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ fn typeck_item_bodies(tcx: TyCtxt<'_>, crate_num: CrateNum) {
754754
});
755755
}
756756

757-
fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) {
758-
wfcheck::check_item_well_formed(tcx, def_id.expect_local());
757+
fn check_item_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) {
758+
wfcheck::check_item_well_formed(tcx, def_id);
759759
}
760760

761761
fn check_trait_item_well_formed(tcx: TyCtxt<'_>, def_id: DefId) {

0 commit comments

Comments
 (0)