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:
parent
ceb45d5519
commit
a34c26e7ec
38 changed files with 136 additions and 131 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue