about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <github35764891676564198441@oli-obk.de>2021-03-15 11:23:44 +0000
committerOli Scherer <github35764891676564198441@oli-obk.de>2021-03-15 12:06:52 +0000
commit21a0c8e9e47942dcbc47f1680d076daeb5629451 (patch)
tree3af430d864cd91f1cf4227b1ce16d9931f0d0e9a
parent6b1dd82162d62fef5fee258b050c96686b5ccbf0 (diff)
s/ConstantSource/ConstantKind/
-rw-r--r--src/constant.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/constant.rs b/src/constant.rs
index 23ad5267c56..9d93370b7d0 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -40,8 +40,8 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
     let mut all_constants_ok = true;
     for constant in &fx.mir.required_consts {
         let const_ = match fx.monomorphize(constant.literal) {
-            ConstantSource::Ty(ct) => ct,
-            ConstantSource::Val(..) => continue,
+            ConstantKind::Ty(ct) => ct,
+            ConstantKind::Val(..) => continue,
         };
         match const_.val {
             ConstKind::Value(_) => {}
@@ -117,8 +117,8 @@ pub(crate) fn codegen_constant<'tcx>(
     constant: &Constant<'tcx>,
 ) -> CValue<'tcx> {
     let const_ = match fx.monomorphize(constant.literal) {
-        ConstantSource::Ty(ct) => ct,
-        ConstantSource::Val(val, ty) => return codegen_const_value(fx, val, ty),
+        ConstantKind::Ty(ct) => ct,
+        ConstantKind::Val(val, ty) => return codegen_const_value(fx, val, ty),
     };
     let const_val = match const_.val {
         ConstKind::Value(const_val) => const_val,
@@ -427,10 +427,10 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
     match operand {
         Operand::Copy(_) | Operand::Move(_) => None,
         Operand::Constant(const_) => match const_.literal {
-            ConstantSource::Ty(const_) => {
+            ConstantKind::Ty(const_) => {
                 fx.monomorphize(const_).eval(fx.tcx, ParamEnv::reveal_all()).val.try_to_value()
             }
-            ConstantSource::Val(val, _) => Some(val),
+            ConstantKind::Val(val, _) => Some(val),
         },
     }
 }