diff options
| author | Andre Bogus <bogusandre@gmail.com> | 2017-05-13 21:40:06 +0200 |
|---|---|---|
| committer | Andre Bogus <bogusandre@gmail.com> | 2017-05-15 23:56:09 +0200 |
| commit | 958c67d9c8ca74370e2052fd8a3d209b8184d1f4 (patch) | |
| tree | 8f89d2dddd401827953e94e8c3e8a0086a8fb068 /src/libsyntax/parse/parser.rs | |
| parent | a9c163ebe9deeaf74699fc8642d919cdb2b5e617 (diff) | |
| download | rust-958c67d9c8ca74370e2052fd8a3d209b8184d1f4.tar.gz rust-958c67d9c8ca74370e2052fd8a3d209b8184d1f4.zip | |
adressed comments by @kennytm and @petrochenkov
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 28c57e0855f..4741f896d3c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1546,7 +1546,7 @@ impl<'a> Parser<'a> { pub fn is_named_argument(&mut self) -> bool { let offset = match self.token { token::BinOp(token::And) | - token::AndAnd | + token::AndAnd => 1, _ if self.token.is_keyword(keywords::Mut) => 1, _ => 0 }; @@ -2569,7 +2569,7 @@ impl<'a> Parser<'a> { s.print_usize(float.trunc() as usize)?; s.pclose()?; word(&mut s.s, ".")?; - word(&mut s.s, fstr.splitn(2, '.').last().unwrap()) + word(&mut s.s, fstr.splitn(2, ".").last().unwrap()) }); err.span_suggestion( lo.to(self.prev_span), @@ -4917,7 +4917,7 @@ impl<'a> Parser<'a> { } } } else { - if let ast::ImplPolarity::Negative = polarity { + if polarity == ast::ImplPolarity::Negative { // This is a negated type implementation // `impl !MyType {}`, which is not allowed. self.span_err(neg_span, "inherent implementation can't be negated"); |
