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:
Oli Scherer 2024-05-29 10:03:40 +00:00
parent ceb45d5519
commit a34c26e7ec
38 changed files with 136 additions and 131 deletions

View file

@ -284,9 +284,9 @@ pub(crate) fn create_config(
}
let hir = tcx.hir();
let body = hir.body(hir.body_owned_by(def_id));
let body = hir.body_owned_by(def_id);
debug!("visiting body for {def_id:?}");
EmitIgnoredResolutionErrors::new(tcx).visit_body(body);
EmitIgnoredResolutionErrors::new(tcx).visit_body(&body);
(rustc_interface::DEFAULT_QUERY_PROVIDERS.typeck)(tcx, def_id)
};
}),