]> git.lizzy.rs Git - rust.git/commitdiff
update `const_eval_resolve`
authorlcnr <rust@lcnr.de>
Sat, 13 Mar 2021 15:31:38 +0000 (16:31 +0100)
committerlcnr <rust@lcnr.de>
Sat, 20 Mar 2021 16:22:24 +0000 (17:22 +0100)
clippy_lints/src/non_copy_const.rs
clippy_utils/src/consts.rs

index 8aebce67917afa1559e16925ced20f8f16238bf7..3e1db233696fe50042b6c80d040cb3059829a190 100644 (file)
@@ -181,7 +181,15 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D
 
     let result = cx
         .tcx
-        .const_eval_resolve(cx.param_env, ty::WithOptConstParam::unknown(def_id), substs, None, None);
+        .const_eval_resolve(
+            cx.param_env,
+            ty::Unevaluated {
+                def: ty::WithOptConstParam::unknown(def_id),
+                substs,
+                promoted: None
+            },
+            None
+        );
     is_value_unfrozen_raw(cx, result, ty)
 }
 
index 802c01055a68c84d68dd4307c841c6b67bcfa334..ebe896b7ae86771c13ecabf27d3434a7d53ec6e0 100644 (file)
@@ -341,9 +341,11 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
                     .tcx
                     .const_eval_resolve(
                         self.param_env,
-                        ty::WithOptConstParam::unknown(def_id),
-                        substs,
-                        None,
+                        ty::Unevaluated {
+                            def: ty::WithOptConstParam::unknown(def_id),
+                            substs,
+                            promoted: None,
+                        },
                         None,
                     )
                     .ok()