Skip to content

Commit 500bcfc

Browse files
committed
update const_eval_resolve
1 parent e4a1092 commit 500bcfc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/constant.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
4545
};
4646
match const_.val {
4747
ConstKind::Value(_) => {}
48-
ConstKind::Unevaluated(def, ref substs, promoted) => {
48+
ConstKind::Unevaluated(unevaluated) => {
4949
if let Err(err) =
50-
fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def, substs, promoted, None)
50+
fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None)
5151
{
5252
all_constants_ok = false;
5353
match err {
@@ -122,14 +122,14 @@ pub(crate) fn codegen_constant<'tcx>(
122122
};
123123
let const_val = match const_.val {
124124
ConstKind::Value(const_val) => const_val,
125-
ConstKind::Unevaluated(def, ref substs, promoted) if fx.tcx.is_static(def.did) => {
125+
ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }) if fx.tcx.is_static(def.did) => {
126126
assert!(substs.is_empty());
127127
assert!(promoted.is_none());
128128

129129
return codegen_static_ref(fx, def.did, fx.layout_of(const_.ty)).to_cvalue(fx);
130130
}
131-
ConstKind::Unevaluated(def, ref substs, promoted) => {
132-
match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def, substs, promoted, None) {
131+
ConstKind::Unevaluated(unevaluated) => {
132+
match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None) {
133133
Ok(const_val) => const_val,
134134
Err(_) => {
135135
span_bug!(constant.span, "erroneous constant not captured by required_consts");

0 commit comments

Comments
 (0)