Skip to content

Commit 731c98b

Browse files
committed
update const_eval_resolve
1 parent 2c4570c commit 731c98b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

clippy_lints/src/non_copy_const.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,15 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D
181181

182182
let result = cx
183183
.tcx
184-
.const_eval_resolve(cx.param_env, ty::WithOptConstParam::unknown(def_id), substs, None, None);
184+
.const_eval_resolve(
185+
cx.param_env,
186+
ty::Unevaluated {
187+
def: ty::WithOptConstParam::unknown(def_id),
188+
substs,
189+
promoted: None
190+
},
191+
None
192+
);
185193
is_value_unfrozen_raw(cx, result, ty)
186194
}
187195

clippy_utils/src/consts.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,11 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
341341
.tcx
342342
.const_eval_resolve(
343343
self.param_env,
344-
ty::WithOptConstParam::unknown(def_id),
345-
substs,
346-
None,
344+
ty::Unevaluated {
345+
def: ty::WithOptConstParam::unknown(def_id),
346+
substs,
347+
promoted: None,
348+
},
347349
None,
348350
)
349351
.ok()

0 commit comments

Comments
 (0)