pub fn check_for_erroneous_unit_struct_expecting(&mut self, expected: &[token::Token]) -> bool {
        if self.token == token::LBRACE
            && expected.iter().all(|t| *t != token::LBRACE)
            && self.look_ahead(1, |t| *t == token::RBRACE) {
            // matched; signal non-fatal error and recover.
            self.span_err(self.span,
                          "Unit-like struct construction is written with no trailing `{ }`");
            self.eat(&token::LBRACE);
            self.eat(&token::RBRACE);
            true
        } else {
            false
        }
    }
// Check for erroneous `ident { }`; if matches, signal error and
// recover (without consuming any expected input token).  Returns
// true if and only if input was consumed for recovery.
Check for erroneous `ident { }`; if matches, signal error and
recover (without consuming any expected input token).  Returns
true if and only if input was consumed for recovery.
Check for erroneous ` ident { } ` ; if matches signal error and recover ( without consuming any expected input token ) . Returns true if and only if input was consumed for recovery .
pub fn check_for_erroneous_unit_struct_expecting(&mut self, expected: &[token::Token]) -> bool {
        if self.token == token::LBRACE
            && expected.iter().all(|t| *t != token::LBRACE)
            && self.look_ahead(1, |t| *t == token::RBRACE) {
            // matched; signal non-fatal error and recover.
            self.span_err(self.span,
                          "Unit-like struct construction is written with no trailing `{ }`");
            self.eat(&token::LBRACE);
            self.eat(&token::RBRACE);
            true
        } else {
            false
        }
    }
pub fn check_for_erroneous_unit_struct_expecting ( & mut self , expected : & [ token :: Token ] ) -> bool { if self . token == token :: LBRACE && expected . iter ( ) . all ( | t | * t != token :: LBRACE ) && self . look_ahead ( 1 , | t | * t == token :: RBRACE ) { // matched; signal non-fatal error and recover. self . span_err ( self . span , " " ) ; self . eat ( & token :: LBRACE ) ; self . eat ( & token :: RBRACE ) ; true } else { false } }
Check for erroneous `ident { }`; if matches, signal error and
recover (without consuming any expected input token).
Check for erroneous ` ident { } ` ; if matches signal error and recover ( without consuming any expected input token ) .
&mut self
expected
&[token::Token]
&mut self
expected
&[token::Token]