diff options
| author | bors <bors@rust-lang.org> | 2015-07-13 13:55:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-13 13:55:29 +0000 |
| commit | 9ff2d19c45f8e110bdcded982c6612ff825e17cb (patch) | |
| tree | bd471c65791816f69f7277e7e76c7b19b690b4c8 /src/libsyntax | |
| parent | df39a92e22d90d21d6b8ce46d8d64bd127335cbd (diff) | |
| parent | af556238ebe72d58adbcf339bd2fa0aef4e3caf9 (diff) | |
| download | rust-9ff2d19c45f8e110bdcded982c6612ff825e17cb.tar.gz rust-9ff2d19c45f8e110bdcded982c6612ff825e17cb.zip | |
Auto merge of #27000 - alexcrichton:semi-after-type, r=cmr
This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:
extern {
fn foo() -> i32; // semicolon after type
}
fn main() {
struct Foo;
Foo; // semicolon after path
}
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 03d4e21a941..634572d4694 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -501,7 +501,7 @@ fn is_in_follow(_: &ExtCtxt, tok: &Token, frag: &str) -> Result<bool, String> { }, "path" | "ty" => { match *tok { - Comma | FatArrow | Colon | Eq | Gt => Ok(true), + Comma | FatArrow | Colon | Eq | Gt | Semi => Ok(true), Ident(i, _) if i.as_str() == "as" => Ok(true), _ => Ok(false) } |
