1
Fork 0

Make OUT an associated type instead of a generic parameter

This avoids toil when changing other functions in `ObligationForest` to take an `OUT` parameter.
This commit is contained in:
Joshua Nelson 2022-09-19 20:57:37 -05:00
parent 5922d6cf60
commit 749dec6451
3 changed files with 6 additions and 0 deletions

View file

@ -95,6 +95,10 @@ pub trait ForestObligation: Clone + Debug {
pub trait ObligationProcessor {
type Obligation: ForestObligation;
type Error: Debug;
type OUT: OutcomeTrait<
Obligation = Self::Obligation,
Error = Error<Self::Obligation, Self::Error>,
>;
fn needs_process_obligation(&self, obligation: &Self::Obligation) -> bool;

View file

@ -64,6 +64,7 @@ where
{
type Obligation = O;
type Error = E;
type OUT = TestOutcome<O, E>;
fn needs_process_obligation(&self, _obligation: &Self::Obligation) -> bool {
true