only allow ConstEquate
with feature(gce)
This commit is contained in:
parent
1536a53ea4
commit
292f0c599f
@ -495,9 +495,11 @@ fn process_obligation(
|
||||
}
|
||||
|
||||
ty::PredicateKind::ConstEquate(c1, c2) => {
|
||||
assert!(
|
||||
self.selcx.tcx().features().generic_const_exprs,
|
||||
"`ConstEquate` without a feature gate: {c1:?} {c2:?}",
|
||||
);
|
||||
debug!(?c1, ?c2, "equating consts");
|
||||
let tcx = self.selcx.tcx();
|
||||
if tcx.features().generic_const_exprs {
|
||||
// FIXME: we probably should only try to unify abstract constants
|
||||
// if the constants depend on generic parameters.
|
||||
//
|
||||
@ -509,7 +511,6 @@ fn process_obligation(
|
||||
return ProcessResult::Changed(vec![]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let stalled_on = &mut pending_obligation.stalled_on;
|
||||
|
||||
|
@ -677,9 +677,12 @@ fn evaluate_predicate_recursively<'o>(
|
||||
}
|
||||
|
||||
ty::PredicateKind::ConstEquate(c1, c2) => {
|
||||
assert!(
|
||||
self.tcx().features().generic_const_exprs,
|
||||
"`ConstEquate` without a feature gate: {c1:?} {c2:?}",
|
||||
);
|
||||
debug!(?c1, ?c2, "evaluate_predicate_recursively: equating consts");
|
||||
|
||||
if self.tcx().features().generic_const_exprs {
|
||||
// FIXME: we probably should only try to unify abstract constants
|
||||
// if the constants depend on generic parameters.
|
||||
//
|
||||
@ -691,7 +694,6 @@ fn evaluate_predicate_recursively<'o>(
|
||||
return Ok(EvaluatedToOk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let evaluate = |c: ty::Const<'tcx>| {
|
||||
if let ty::ConstKind::Unevaluated(unevaluated) = c.kind() {
|
||||
|
Loading…
Reference in New Issue
Block a user