1
Fork 0

Break up long function in trait selection error reporting

- Move blocks of code into their own functions
- Replace a few function argument types with their type aliases
This commit is contained in:
Bryan Garza 2023-04-19 14:59:36 -07:00
parent 409661936f
commit d0d40d2a40
6 changed files with 659 additions and 430 deletions

View file

@ -123,7 +123,7 @@ pub struct FulfillmentError<'tcx> {
#[derive(Clone)]
pub enum FulfillmentErrorCode<'tcx> {
/// Inherently impossible to fulfill; this trait is implemented if and only if it is already implemented.
CodeCycle(Vec<Obligation<'tcx, ty::Predicate<'tcx>>>),
CodeCycle(Vec<PredicateObligation<'tcx>>),
CodeSelectionError(SelectionError<'tcx>),
CodeProjectionError(MismatchedProjectionTypes<'tcx>),
CodeSubtypeError(ExpectedFound<Ty<'tcx>>, TypeError<'tcx>), // always comes from a SubtypePredicate