pub fn commit_stmt(&mut self, edible: &[token::Token],
                       inedible: &[token::Token]) -> PResult<'a, ()> {
        if self.last_token
               .as_ref()
               .map_or(false, |t| t.is_ident() || t.is_path()) {
            let expected = edible.iter()
                .cloned()
                .chain(inedible.iter().cloned())
                .collect::<Vec<_>>();
            self.check_for_erroneous_unit_struct_expecting(&expected);
        }
        self.expect_one_of(edible, inedible)
    }
/// Commit to parsing a complete statement `s`, which expects to be
/// followed by some token from the set edible + inedible.  Check
/// for recoverable input errors, discarding erroneous characters.
Commit to parsing a complete statement `s`, which expects to be
followed by some token from the set edible + inedible.  Check
for recoverable input errors, discarding erroneous characters.
Commit to parsing a complete statement ` s ` which expects to be followed by some token from the set edible + inedible . Check for recoverable input errors discarding erroneous characters .
pub fn commit_stmt(&mut self, edible: &[token::Token],
                       inedible: &[token::Token]) -> PResult<'a, ()> {
        if self.last_token
               .as_ref()
               .map_or(false, |t| t.is_ident() || t.is_path()) {
            let expected = edible.iter()
                .cloned()
                .chain(inedible.iter().cloned())
                .collect::<Vec<_>>();
            self.check_for_erroneous_unit_struct_expecting(&expected);
        }
        self.expect_one_of(edible, inedible)
    }
pub fn commit_stmt ( & mut self , edible : & [ token :: Token ] , inedible : & [ token :: Token ] ) -> PResult < ' a , ( ) > { if self . last_token . as_ref ( ) . map_or ( false , | t | t . is_ident ( ) || t . is_path ( ) ) { let expected = edible . iter ( ) . cloned ( ) . chain ( inedible . iter ( ) . cloned ( ) ) . collect :: < Vec < _ > > ( ) ; self . check_for_erroneous_unit_struct_expecting ( & expected ) ; } self . expect_one_of ( edible , inedible ) }
Commit to parsing a complete statement `s`, which expects to be
followed by some token from the set edible + inedible.
Commit to parsing a complete statement ` s ` which expects to be followed by some token from the set edible + inedible .
&mut self
edible
&[token::Token]
inedible
&[token::Token]
&mut self
edible
&[token::Token]
inedible
&[token::Token]