Accept LocalDefId as key for check_item_well_formed query

This commit is contained in:
marmeladema 2020-04-18 17:08:30 +01:00
parent c9f6ffc3b0
commit d9e5fa15ff
2 changed files with 5 additions and 3 deletions

View File

@ -804,7 +804,9 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
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) -> () {}
}

View File

@ -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) {