fn solve_from_clauses<C>(
        &mut self,
        binders: &[ParameterKind<UniverseIndex>],
        goal: &InEnvironment<DomainGoal>,
        clauses: C
    ) -> Result<Solution>
    where
        C: IntoIterator<Item = ProgramClause>,
    {
        let mut cur_solution = None;
        for ProgramClause { implication, .. } in clauses {
            debug_heading!("clause={:?}", implication);

            let res = self.solve_via_implication(binders, goal.clone(), implication);
            if let Ok(solution) = res {
                debug!("ok: solution={:?}", solution);
                cur_solution = Some(
                    match cur_solution {
                        None => solution,
                        Some(cur) => solution.combine(cur),
                    },
                );
            } else {
                debug!("error");
            }
        }
        cur_solution.ok_or("no applicable candidates".into())
    }
/// See whether we can solve a goal by implication on any of the given
/// clauses. If multiple such solutions are possible, we attempt to combine
/// them.
See whether we can solve a goal by implication on any of the given
clauses. If multiple such solutions are possible, we attempt to combine
them.
See whether we can solve a goal by implication on any of the given clauses . If multiple such solutions are possible we attempt to combine them .
fn solve_from_clauses<C>(
        &mut self,
        binders: &[ParameterKind<UniverseIndex>],
        goal: &InEnvironment<DomainGoal>,
        clauses: C
    ) -> Result<Solution>
    where
        C: IntoIterator<Item = ProgramClause>,
    {
        let mut cur_solution = None;
        for ProgramClause { implication, .. } in clauses {
            debug_heading!("clause={:?}", implication);
            let res = self.solve_via_implication(binders, goal.clone(), implication);
            if let Ok(solution) = res {
                debug!("ok: solution={:?}", solution);
                cur_solution = Some(
                    match cur_solution {
                        None => solution,
                        Some(cur) => solution.combine(cur),
                    },
                );
            } else {
                debug!("error");
            }
        }
        cur_solution.ok_or("no applicable candidates".into())
    }
fn solve_from_clauses < C > ( & mut self , binders : & [ ParameterKind < UniverseIndex > ] , goal : & InEnvironment < DomainGoal > , clauses : C ) -> Result < Solution > where C : IntoIterator < Item = ProgramClause > , { let mut cur_solution = None ; for ProgramClause { implication , .. } in clauses { debug_heading ! ( " " implication ) ; let res = self . solve_via_implication ( binders , goal . clone ( ) , implication ) ; if let Ok ( solution ) = res { debug ! ( " " solution ) ; cur_solution = Some ( match cur_solution { None => solution , Some ( cur ) => solution . combine ( cur ) , } , ) ; } else { debug ! ( " " ) ; } } cur_solution . ok_or ( " " . into ( ) ) }
See whether we can solve a goal by implication on any of the given
clauses.
See whether we can solve a goal by implication on any of the given clauses .
&mut self
binders
&[ParameterKind<UniverseIndex>]
goal
&InEnvironment<DomainGoal>
clauses
C