let body_id = BodyId {
hir_id: body.value.hir_id,
};
- let def_id = cx.tcx.hir().body_owner_def_id(body_id);
- let typeck_results = cx.tcx.typeck(def_id);
+ let typeck_results = cx.tcx.typeck_body(body_id);
let expr_ty = typeck_results.expr_ty(&body.value);
if implements_trait(cx, expr_ty, future_trait_def_id, &[]) {