Skip to content

Commit d9277c6

Browse files
committed
Auto merge of rust-lang#102056 - b-naber:unevaluated, r=lcnr
Introduce mir::Unevaluated Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that. r? `@lcnr`
2 parents 2063b8f + 26861fb commit d9277c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: clippy_lints/src/non_copy_const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D
195195

196196
let result = cx.tcx.const_eval_resolve(
197197
cx.param_env,
198-
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
198+
mir::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs),
199199
None,
200200
);
201201
is_value_unfrozen_raw(cx, result, ty)

Diff for: clippy_utils/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
424424
.tcx
425425
.const_eval_resolve(
426426
self.param_env,
427-
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
427+
mir::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs),
428428
None,
429429
)
430430
.ok()

0 commit comments

Comments
 (0)