distinguish recursion limit based overflow for diagnostics
also change the number of allowed fixpoint steps to be fixed instead of using the `log` of the total recursion depth.
This commit is contained in:
parent
d3d145ea1c
commit
5ec9b8d778
25 changed files with 91 additions and 125 deletions
|
@ -80,11 +80,14 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
|||
.0
|
||||
{
|
||||
Ok((_, Certainty::Maybe(MaybeCause::Ambiguity))) => {
|
||||
FulfillmentErrorCode::Ambiguity { overflow: false }
|
||||
}
|
||||
Ok((_, Certainty::Maybe(MaybeCause::Overflow))) => {
|
||||
FulfillmentErrorCode::Ambiguity { overflow: true }
|
||||
FulfillmentErrorCode::Ambiguity { overflow: None }
|
||||
}
|
||||
Ok((
|
||||
_,
|
||||
Certainty::Maybe(MaybeCause::Overflow { suggest_increasing_limit }),
|
||||
)) => FulfillmentErrorCode::Ambiguity {
|
||||
overflow: Some(suggest_increasing_limit),
|
||||
},
|
||||
Ok((_, Certainty::Yes)) => {
|
||||
bug!("did not expect successful goal when collecting ambiguity errors")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue