Make body_owned_by return the body directly.
Almost all callers want this anyway, and now we can use it to also return fed bodies
This commit is contained in:
@@ -226,7 +226,8 @@ fn mir_keys(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LocalDefId> {
|
||||
// typeck instead of during ast lowering, like all other bodies so far.
|
||||
for def_id in tcx.hir().body_owners() {
|
||||
// Incremental performance optimization: only load typeck results for things that actually have inline consts
|
||||
if tcx.hir_owner_nodes(tcx.hir().body_owned_by(def_id).hir_id.owner).has_inline_consts {
|
||||
if tcx.hir_owner_nodes(tcx.hir().body_owned_by(def_id).id().hir_id.owner).has_inline_consts
|
||||
{
|
||||
set.extend(tcx.typeck(def_id).inline_consts.values())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user