about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-26 13:02:49 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-03-26 13:02:49 +0100
commit9a21312480e28eb0486fc6d4221e45fd231c9dd4 (patch)
treec11db7121054c30935e32317abccf1b746942311
parent73626efb26f61c68c8c9d4bec0a35928130a2010 (diff)
parent500bcfcdb3122d68cabdfc2eb9034d88b708e0bc (diff)
downloadrust-9a21312480e28eb0486fc6d4221e45fd231c9dd4.tar.gz
rust-9a21312480e28eb0486fc6d4221e45fd231c9dd4.zip
Sync from rust 4137088d9da94f693b287f35e2b17782c0b1a283
-rw-r--r--src/constant.rs10
-rw-r--r--src/intrinsics/simd.rs1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/constant.rs b/src/constant.rs
index 038b09f71d8..1b64d6770d2 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -45,9 +45,9 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
         };
         match const_.val {
             ConstKind::Value(_) => {}
-            ConstKind::Unevaluated(def, ref substs, promoted) => {
+            ConstKind::Unevaluated(unevaluated) => {
                 if let Err(err) =
-                    fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def, substs, promoted, None)
+                    fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None)
                 {
                     all_constants_ok = false;
                     match err {
@@ -124,14 +124,14 @@ pub(crate) fn codegen_constant<'tcx>(
     };
     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) => {
+        ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }) if fx.tcx.is_static(def.did) => {
             assert!(substs.is_empty());
             assert!(promoted.is_none());
 
             return codegen_static_ref(fx, def.did, fx.layout_of(const_.ty)).to_cvalue(fx);
         }
-        ConstKind::Unevaluated(def, ref substs, promoted) => {
-            match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def, substs, promoted, None) {
+        ConstKind::Unevaluated(unevaluated) => {
+            match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), unevaluated, None) {
                 Ok(const_val) => const_val,
                 Err(_) => {
                     span_bug!(constant.span, "erroneous constant not captured by required_consts");
diff --git a/src/intrinsics/simd.rs b/src/intrinsics/simd.rs
index e0a3056e58c..c7ce32b385e 100644
--- a/src/intrinsics/simd.rs
+++ b/src/intrinsics/simd.rs
@@ -276,5 +276,6 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
         // simd_bitmask
         // simd_select
         // simd_rem
+        // simd_neg
     }
 }