review
This commit is contained in:
@@ -85,7 +85,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
|
||||
let leaf = leaf.subst(tcx, ct.substs);
|
||||
if leaf.has_infer_types_or_consts() {
|
||||
failure_kind = FailureKind::MentionsInfer;
|
||||
} else if leaf.has_param_types_or_consts(tcx) {
|
||||
} else if leaf.definitely_has_param_types_or_consts(tcx) {
|
||||
failure_kind = cmp::min(failure_kind, FailureKind::MentionsParam);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
|
||||
let ty = ty.subst(tcx, ct.substs);
|
||||
if ty.has_infer_types_or_consts() {
|
||||
failure_kind = FailureKind::MentionsInfer;
|
||||
} else if ty.has_param_types_or_consts(tcx) {
|
||||
} else if ty.definitely_has_param_types_or_consts(tcx) {
|
||||
failure_kind = cmp::min(failure_kind, FailureKind::MentionsParam);
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
|
||||
// See #74595 for more details about this.
|
||||
let concrete = infcx.const_eval_resolve(param_env, uv.expand(), Some(span));
|
||||
|
||||
if concrete.is_ok() && uv.substs(infcx.tcx).has_param_types_or_consts(infcx.tcx) {
|
||||
if concrete.is_ok() && uv.substs(infcx.tcx).definitely_has_param_types_or_consts(infcx.tcx) {
|
||||
match infcx.tcx.def_kind(uv.def.did) {
|
||||
DefKind::AnonConst => {
|
||||
let mir_body = infcx.tcx.mir_for_ctfe_opt_const_arg(uv.def);
|
||||
|
||||
Reference in New Issue
Block a user