Skip to content

Commit 98a4770

Browse files
committed
Formatting fixes
1 parent 1ab50f3 commit 98a4770

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,10 @@ impl<'a> Parser<'a> {
16611661
LitBinary(parse::binary_lit(i.as_str())),
16621662
token::LitBinaryRaw(i, _) =>
16631663
LitBinary(Rc::new(i.as_str().as_bytes().iter().map(|&x| x).collect())),
1664-
token::OpenDelim(token::Paren) => { self.expect(&token::CloseDelim(token::Paren)); LitNil },
1664+
token::OpenDelim(token::Paren) => {
1665+
self.expect(&token::CloseDelim(token::Paren));
1666+
LitNil
1667+
},
16651668
_ => { self.unexpected_last(tok); }
16661669
}
16671670
}
@@ -2047,7 +2050,8 @@ impl<'a> Parser<'a> {
20472050
return self.mk_expr(lo, hi, ExprLit(lit));
20482051
}
20492052
let mut es = vec!(self.parse_expr());
2050-
self.commit_expr(&**es.last().unwrap(), &[], &[token::Comma, token::CloseDelim(token::Paren)]);
2053+
self.commit_expr(&**es.last().unwrap(), &[],
2054+
&[token::Comma, token::CloseDelim(token::Paren)]);
20512055
while self.token == token::Comma {
20522056
self.bump();
20532057
if self.token != token::CloseDelim(token::Paren) {
@@ -2454,7 +2458,8 @@ impl<'a> Parser<'a> {
24542458
// e[e..e]
24552459
_ => {
24562460
let e2 = self.parse_expr();
2457-
self.commit_expr_expecting(&*e2, token::CloseDelim(token::Bracket));
2461+
self.commit_expr_expecting(&*e2,
2462+
token::CloseDelim(token::Bracket));
24582463
Some(e2)
24592464
}
24602465
};
@@ -2720,7 +2725,9 @@ impl<'a> Parser<'a> {
27202725
self.bump();
27212726
let last_span = self.last_span;
27222727
match self.token {
2723-
token::OpenDelim(token::Bracket) => self.obsolete(last_span, ObsoleteOwnedVector),
2728+
token::OpenDelim(token::Bracket) => {
2729+
self.obsolete(last_span, ObsoleteOwnedVector)
2730+
},
27242731
_ => self.obsolete(last_span, ObsoleteOwnedExpr)
27252732
}
27262733

@@ -3704,7 +3711,8 @@ impl<'a> Parser<'a> {
37043711
// expression without semicolon
37053712
if classify::expr_requires_semi_to_be_stmt(&*e) {
37063713
// Just check for errors and recover; do not eat semicolon yet.
3707-
self.commit_stmt(&[], &[token::Semi, token::CloseDelim(token::Brace)]);
3714+
self.commit_stmt(&[], &[token::Semi,
3715+
token::CloseDelim(token::Brace)]);
37083716
}
37093717

37103718
match self.token {

src/libsyntax/parse/token.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Token {
267267
pub fn is_plain_ident(&self) -> bool {
268268
match *self {
269269
Ident(_, Plain) => true,
270-
_ => false,
270+
_ => false,
271271
}
272272
}
273273

@@ -392,20 +392,20 @@ impl Token {
392392
#[deriving(Clone, Encodable, Decodable, PartialEq, Eq, Hash)]
393393
/// For interpolation during macro expansion.
394394
pub enum Nonterminal {
395-
NtItem( P<ast::Item>),
395+
NtItem(P<ast::Item>),
396396
NtBlock(P<ast::Block>),
397-
NtStmt( P<ast::Stmt>),
398-
NtPat( P<ast::Pat>),
399-
NtExpr( P<ast::Expr>),
400-
NtTy( P<ast::Ty>),
397+
NtStmt(P<ast::Stmt>),
398+
NtPat(P<ast::Pat>),
399+
NtExpr(P<ast::Expr>),
400+
NtTy(P<ast::Ty>),
401401
#[cfg(stage0)]
402402
NtIdent(Box<ast::Ident>, bool),
403403
#[cfg(not(stage0))]
404404
NtIdent(Box<ast::Ident>, IdentStyle),
405405
/// Stuff inside brackets for attributes
406-
NtMeta( P<ast::MetaItem>),
406+
NtMeta(P<ast::MetaItem>),
407407
NtPath(Box<ast::Path>),
408-
NtTT( P<ast::TokenTree>), // needs P'ed to break a circularity
408+
NtTT(P<ast::TokenTree>), // needs P'ed to break a circularity
409409
NtMatchers(Vec<ast::Matcher>)
410410
}
411411

0 commit comments

Comments
 (0)