mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 12:54:00 +00:00
Remove WithOptconstParam.
This commit is contained in:
parent
d3b1001ba4
commit
8ead58c67b
@ -196,11 +196,9 @@ fn is_value_unfrozen_poly<'tcx>(cx: &LateContext<'tcx>, body_id: BodyId, ty: Ty<
|
||||
fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: DefId, ty: Ty<'tcx>) -> bool {
|
||||
let substs = cx.typeck_results().node_substs(hir_id);
|
||||
|
||||
let result = cx.tcx.const_eval_resolve(
|
||||
cx.param_env,
|
||||
mir::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||
None,
|
||||
);
|
||||
let result = cx
|
||||
.tcx
|
||||
.const_eval_resolve(cx.param_env, mir::UnevaluatedConst::new(def_id, substs), None);
|
||||
is_value_unfrozen_raw(cx, result, ty)
|
||||
}
|
||||
|
||||
|
@ -450,11 +450,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
|
||||
let result = self
|
||||
.lcx
|
||||
.tcx
|
||||
.const_eval_resolve(
|
||||
self.param_env,
|
||||
mir::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||
None,
|
||||
)
|
||||
.const_eval_resolve(self.param_env, mir::UnevaluatedConst::new(def_id, substs), None)
|
||||
.ok()
|
||||
.map(|val| rustc_middle::mir::ConstantKind::from_value(val, ty))?;
|
||||
let result = miri_to_const(self.lcx.tcx, result);
|
||||
|
Loading…
Reference in New Issue
Block a user