about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
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
commitc30c1be1e69a0cf37855b611fa0921e41e04016f (patch)
treed3f35feb423a420dac4543dae9d4a97e7ad04901 /compiler/rustc_codegen_cranelift/src
parent11ddd2251061bd84408c6e098588c41f4f51370b (diff)
downloadrust-c30c1be1e69a0cf37855b611fa0921e41e04016f.tar.gz
rust-c30c1be1e69a0cf37855b611fa0921e41e04016f.zip
s/ConstantSource/ConstantKind/
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/constant.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs
index 23ad5267c56..9d93370b7d0 100644
--- a/compiler/rustc_codegen_cranelift/src/constant.rs
+++ b/compiler/rustc_codegen_cranelift/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),
         },
     }
 }