Skip to content

Commit 21a0c8e

Browse files
committed
s/ConstantSource/ConstantKind/
1 parent 6b1dd82 commit 21a0c8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/constant.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
4040
let mut all_constants_ok = true;
4141
for constant in &fx.mir.required_consts {
4242
let const_ = match fx.monomorphize(constant.literal) {
43-
ConstantSource::Ty(ct) => ct,
44-
ConstantSource::Val(..) => continue,
43+
ConstantKind::Ty(ct) => ct,
44+
ConstantKind::Val(..) => continue,
4545
};
4646
match const_.val {
4747
ConstKind::Value(_) => {}
@@ -117,8 +117,8 @@ pub(crate) fn codegen_constant<'tcx>(
117117
constant: &Constant<'tcx>,
118118
) -> CValue<'tcx> {
119119
let const_ = match fx.monomorphize(constant.literal) {
120-
ConstantSource::Ty(ct) => ct,
121-
ConstantSource::Val(val, ty) => return codegen_const_value(fx, val, ty),
120+
ConstantKind::Ty(ct) => ct,
121+
ConstantKind::Val(val, ty) => return codegen_const_value(fx, val, ty),
122122
};
123123
let const_val = match const_.val {
124124
ConstKind::Value(const_val) => const_val,
@@ -427,10 +427,10 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
427427
match operand {
428428
Operand::Copy(_) | Operand::Move(_) => None,
429429
Operand::Constant(const_) => match const_.literal {
430-
ConstantSource::Ty(const_) => {
430+
ConstantKind::Ty(const_) => {
431431
fx.monomorphize(const_).eval(fx.tcx, ParamEnv::reveal_all()).val.try_to_value()
432432
}
433-
ConstantSource::Val(val, _) => Some(val),
433+
ConstantKind::Val(val, _) => Some(val),
434434
},
435435
}
436436
}

0 commit comments

Comments
 (0)