pub fn candidate_under_assumption(&mut self,
                                      test_lvalue: &Lvalue<'tcx>,
                                      test_kind: &TestKind<'tcx>,
                                      test_outcome: usize,
                                      candidate: &Candidate<'tcx>)
                                      -> Option<Candidate<'tcx>> {
        let candidate = candidate.clone();
        let match_pairs = candidate.match_pairs;
        let result = self.match_pairs_under_assumption(test_lvalue,
                                                       test_kind,
                                                       test_outcome,
                                                       match_pairs);
        match result {
            Some(match_pairs) => Some(Candidate { match_pairs: match_pairs, ..candidate }),
            None => None,
        }
    }
/// Given a candidate and the outcome of a test we have performed,
/// transforms the candidate into a new candidate that reflects
/// further tests still needed. Returns `None` if this candidate
/// has now been ruled out.
///
/// For example, if a candidate included the patterns `[x.0 @
/// Ok(P1), x.1 @ 22]`, and we did a switch test on `x.0` and
/// found the variant `Err` (as indicated by the `test_outcome`
/// parameter), we would return `None`. But if the test_outcome
/// were `Ok`, we would return `Some([x.0.downcast<Ok>.0 @ P1, x.1
/// @ 22])`.
Given a candidate and the outcome of a test we have performed,
transforms the candidate into a new candidate that reflects
further tests still needed. Returns `None` if this candidate
has now been ruled out.


Given a candidate and the outcome of a test we have performed transforms the candidate into a new candidate that reflects further tests still needed . Returns ` None ` if this candidate has now been ruled out .
pub fn candidate_under_assumption(&mut self,
                                      test_lvalue: &Lvalue<'tcx>,
                                      test_kind: &TestKind<'tcx>,
                                      test_outcome: usize,
                                      candidate: &Candidate<'tcx>)
                                      -> Option<Candidate<'tcx>> {
        let candidate = candidate.clone();
        let match_pairs = candidate.match_pairs;
        let result = self.match_pairs_under_assumption(test_lvalue,
                                                       test_kind,
                                                       test_outcome,
                                                       match_pairs);
        match result {
            Some(match_pairs) => Some(Candidate { match_pairs: match_pairs, ..candidate }),
            None => None,
        }
    }
pub fn candidate_under_assumption ( & mut self , test_lvalue : & Lvalue < ' tcx > , test_kind : & TestKind < ' tcx > , test_outcome : usize , candidate : & Candidate < ' tcx > ) -> Option < Candidate < ' tcx > > { let candidate = candidate . clone ( ) ; let match_pairs = candidate . match_pairs ; let result = self . match_pairs_under_assumption ( test_lvalue , test_kind , test_outcome , match_pairs ) ; match result { Some ( match_pairs ) => Some ( Candidate { match_pairs : match_pairs , .. candidate } ) , None => None , } }
Given a candidate and the outcome of a test we have performed,
transforms the candidate into a new candidate that reflects
further tests still needed.
Given a candidate and the outcome of a test we have performed transforms the candidate into a new candidate that reflects further tests still needed .
&mut self
test_lvalue
&Lvalue<'tcx>
test_kind
&TestKind<'tcx>
test_outcome
usize
candidate
&Candidate<'tcx>
None