diff options
| author | bors <bors@rust-lang.org> | 2017-10-17 14:57:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-17 14:57:33 +0000 |
| commit | f6d7514545cbe83e771a400d04049b96dfb210cd (patch) | |
| tree | 11fbe162f7fd6a69b48549598001472f4d311045 /src/libsyntax/parse/parser.rs | |
| parent | 0be6863a15f5aacacb287ca490823ab3b7ceb302 (diff) | |
| parent | 7f72b311653401226fedeb29bcae484993a14ac0 (diff) | |
| download | rust-f6d7514545cbe83e771a400d04049b96dfb210cd.tar.gz rust-f6d7514545cbe83e771a400d04049b96dfb210cd.zip | |
Auto merge of #45344 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests - Successful merges: #45097, #45151, #45307, #45308, #45310, #45315, #45321, #45329, #45338, #45339 - Failed merges:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index bd400ef6dd6..8fd2bad4e44 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4088,11 +4088,11 @@ impl<'a> Parser<'a> { node: StmtKind::Item(i), }, None => { - let unused_attrs = |attrs: &[_], s: &mut Self| { + let unused_attrs = |attrs: &[Attribute], s: &mut Self| { if !attrs.is_empty() { if s.prev_token_kind == PrevTokenKind::DocComment { s.span_fatal_err(s.prev_span, Error::UselessDocComment).emit(); - } else { + } else if attrs.iter().any(|a| a.style == AttrStyle::Outer) { s.span_err(s.span, "expected statement after outer attribute"); } } |
