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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user