about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/constant.rs
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-10-28 08:25:06 +0100
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-11-16 22:42:09 +0100
commit7f45668af6563645f77bb5a6ba26a92c287ce1f8 (patch)
tree82d06e90f3831fc59526384861b3b6fd5dfa4cca /compiler/rustc_codegen_cranelift/src/constant.rs
parenta6cbd64dae97fc0cf626ad688b285f5a8ecde393 (diff)
downloadrust-7f45668af6563645f77bb5a6ba26a92c287ce1f8.tar.gz
rust-7f45668af6563645f77bb5a6ba26a92c287ce1f8.zip
update `cg_clif`
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/constant.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/constant.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs
index 41cfae4ca6e..351bb6ecd23 100644
--- a/compiler/rustc_codegen_cranelift/src/constant.rs
+++ b/compiler/rustc_codegen_cranelift/src/constant.rs
@@ -38,7 +38,7 @@ impl ConstantCx {
 
 pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, impl Module>) {
     for constant in &fx.mir.required_consts {
-        let const_ = fx.monomorphize(&constant.literal);
+        let const_ = fx.monomorphize(constant.literal);
         match const_.val {
             ConstKind::Value(_) => {}
             ConstKind::Unevaluated(def, ref substs, promoted) => {
@@ -110,7 +110,7 @@ pub(crate) fn codegen_constant<'tcx>(
     fx: &mut FunctionCx<'_, 'tcx, impl Module>,
     constant: &Constant<'tcx>,
 ) -> CValue<'tcx> {
-    let const_ = fx.monomorphize(&constant.literal);
+    let const_ = fx.monomorphize(constant.literal);
     let const_val = match const_.val {
         ConstKind::Value(const_val) => const_val,
         ConstKind::Unevaluated(def, ref substs, promoted) if fx.tcx.is_static(def.did) => {
@@ -466,7 +466,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
     match operand {
         Operand::Copy(_) | Operand::Move(_) => None,
         Operand::Constant(const_) => Some(
-            fx.monomorphize(&const_.literal)
+            fx.monomorphize(const_.literal)
                 .eval(fx.tcx, ParamEnv::reveal_all()),
         ),
     }