.tcx()
.const_eval_resolve(ty::ParamEnv::reveal_all(), def, substs, promoted, None)
.map_err(|err| {
- if promoted.is_none() {
- self.cx
- .tcx()
- .sess
- .span_err(constant.span, "erroneous constant encountered");
- }
+ self.cx.tcx().sess.span_err(constant.span, "erroneous constant encountered");
err
}),
ty::ConstKind::Value(value) => Ok(value),