Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tidy
  • Loading branch information
Petar Dambovaliev committed Oct 25, 2019
commit 56311bf7133e2d3bf945a4a7be65f48f0b74cdb7
4 changes: 3 additions & 1 deletion src/libsyntax/parse/parser/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ impl<'a> Parser<'a> {
}

/// Returns `true` if the next token is Brace
fn is_next_brace(&self) -> bool { self.look_ahead(1, |t| t.eq(&token::OpenDelim(token::Brace))) }
fn is_next_brace(&self) -> bool {
self.look_ahead(1, |t| t.eq(&token::OpenDelim(token::Brace)))
}

/// Returns `true` if the token is kw::Mut and next one is an Ident
fn is_ident_mut(&self) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tho I appreciate the spirit of writing small functions, this function is small enough that it can be inlined where it is used. :) (General point that applies to other functions introduced.)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#[allow(dead_code)]
fn main() {
auto n = 0;//~ ERROR invalid variable declaration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#[allow(dead_code)]
fn main() {
var n = 0;//~ ERROR invalid variable declaration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#[allow(dead_code)]
fn main() {
mut n = 0;//~ ERROR invalid variable declaration
Expand Down