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:
@@ -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)
|
||||
};
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user