pub fn combine(self, other: Solution) -> Solution {
        use self::Guidance::*;

        if self == other { return self }

        // Otherwise, always downgrade to Ambig:

        let guidance = match (self.into_guidance(), other.into_guidance()) {
            (Definite(ref subst1), Definite(ref subst2)) if subst1 == subst2 =>
                Definite(subst1.clone()),
            (Suggested(ref subst1), Suggested(ref subst2)) if subst1 == subst2 =>
                Suggested(subst1.clone()),
            _ => Unknown,
        };
        Solution::Ambig(guidance)
    }
/// There are multiple candidate solutions, which may or may not agree on
/// the values for existential variables; attempt to combine them. This
/// operation does not depend on the order of its arguments.
//
// This actually isn't as precise as it could be, in two ways:
//
// a. It might be that while there are multiple distinct candidates, they
//    all agree about *some things*. To be maximally precise, we would
//    compute the intersection of what they agree on. It's not clear though
//    that this is actually what we want Rust's inference to do, and it's
//    certainly not what it does today.
//
// b. There might also be an ambiguous candidate and a successful candidate,
//    both with the same refined-goal. In that case, we could probably claim
//    success, since if the conditions of the ambiguous candidate were met,
//    we know the success would apply.  Example: `?0: Clone` yields ambiguous
//    candidate `Option<?0>: Clone` and successful candidate `Option<?0>:
//    Clone`.
//
// But you get the idea.
There are multiple candidate solutions, which may or may not agree on
the values for existential variables; attempt to combine them. This
operation does not depend on the order of its arguments.

This actually isn't as precise as it could be, in two ways.

a. It might be that while there are multiple distinct candidates, they
all agree about *some things*. To be maximally precise, we would
compute the intersection of what they agree on. It's not clear though
that this is actually what we want Rust's inference to do, and it's
certainly not what it does today.

b. There might also be an ambiguous candidate and a successful candidate,
both with the same refined-goal. In that case, we could probably claim
success, since if the conditions of the ambiguous candidate were met,
we know the success would apply.

But you get the idea.
There are multiple candidate solutions which may or may not agree on the values for existential variables ; attempt to combine them . This operation does not depend on the order of its arguments . This actually isn ' t as precise as it could be in two ways . a . It might be that while there are multiple distinct candidates they all agree about * some things * . To be maximally precise we would compute the intersection of what they agree on . It ' s not clear though that this is actually what we want Rust ' s inference to do and it ' s certainly not what it does today . b . There might also be an ambiguous candidate and a successful candidate both with the same refined - goal . In that case we could probably claim success since if the conditions of the ambiguous candidate were met we know the success would apply . But you get the idea .
pub fn combine(self, other: Solution) -> Solution {
        use self::Guidance::*;
        if self == other { return self }
        // Otherwise, always downgrade to Ambig:
        let guidance = match (self.into_guidance(), other.into_guidance()) {
            (Definite(ref subst1), Definite(ref subst2)) if subst1 == subst2 =>
                Definite(subst1.clone()),
            (Suggested(ref subst1), Suggested(ref subst2)) if subst1 == subst2 =>
                Suggested(subst1.clone()),
            _ => Unknown,
        };
        Solution::Ambig(guidance)
    }
pub fn combine ( self , other : Solution ) -> Solution { use self :: Guidance :: * ; if self == other { return self } // Otherwise, always downgrade to Ambig: let guidance = match ( self . into_guidance ( ) , other . into_guidance ( ) ) { ( Definite ( ref subst1 ) , Definite ( ref subst2 ) ) if subst1 == subst2 => Definite ( subst1 . clone ( ) ) , ( Suggested ( ref subst1 ) , Suggested ( ref subst2 ) ) if subst1 == subst2 => Suggested ( subst1 . clone ( ) ) , _ => Unknown , } ; Solution :: Ambig ( guidance ) }
There are multiple candidate solutions, which may or may not agree on
the values for existential variables; attempt to combine them.
There are multiple candidate solutions which may or may not agree on the values for existential variables ; attempt to combine them .
self
other
Solution