1
Fork 0

Report overflows gracefully with new solver

This commit is contained in:
Michael Goulet 2023-04-09 04:29:43 +00:00
parent 2a198c7f62
commit 05a6daab84
14 changed files with 75 additions and 27 deletions

View file

@ -128,7 +128,11 @@ pub enum FulfillmentErrorCode<'tcx> {
CodeProjectionError(MismatchedProjectionTypes<'tcx>),
CodeSubtypeError(ExpectedFound<Ty<'tcx>>, TypeError<'tcx>), // always comes from a SubtypePredicate
CodeConstEquateError(ExpectedFound<Const<'tcx>>, TypeError<'tcx>),
CodeAmbiguity,
CodeAmbiguity {
/// Overflow reported from the new solver `-Ztrait-solver=next`, which will
/// be reported as an regular error as opposed to a fatal error.
overflow: bool,
},
}
impl<'tcx, O> Obligation<'tcx, O> {