hir::ItemKind::Const(_, body_id) => {
let def_id = cx.tcx.hir().body_owner_def_id(body_id).to_def_id();
// trigger the query once for all constants since that will already report the errors
- // FIXME: Use ensure here
- let _ = cx.tcx.const_eval_poly(def_id);
+ cx.tcx.ensure().const_eval_poly(def_id);
}
hir::ItemKind::Static(_, _, body_id) => {
let def_id = cx.tcx.hir().body_owner_def_id(body_id).to_def_id();
- // FIXME: Use ensure here
- let _ = cx.tcx.eval_static_initializer(def_id);
+ cx.tcx.ensure().eval_static_initializer(def_id);
}
_ => {}
}