Use emit_inference_failure_err for ConstEvaluatable predicates
This commit is contained in:
parent
adaddb5bab
commit
82ab171673
@ -2156,6 +2156,22 @@ fn maybe_report_ambiguity(
|
||||
}
|
||||
}
|
||||
|
||||
ty::PredicateKind::ConstEvaluatable(data) => {
|
||||
let subst = data.substs.iter().find(|g| g.has_infer_types_or_consts());
|
||||
if let Some(subst) = subst {
|
||||
let mut err = self.emit_inference_failure_err(
|
||||
body_id,
|
||||
span,
|
||||
subst,
|
||||
ErrorCode::E0284,
|
||||
true,
|
||||
);
|
||||
err.note(&format!("cannot satisfy `{}`", predicate));
|
||||
err
|
||||
} else {
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
if self.tcx.sess.has_errors().is_some() || self.is_tainted_by_errors() {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user