]> git.lizzy.rs Git - rust.git/commit
syntax: Allow semi tokens after macro ty/path
authorAlex Crichton <alex@alexcrichton.com>
Sun, 12 Jul 2015 22:53:04 +0000 (15:53 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 12 Jul 2015 22:53:04 +0000 (15:53 -0700)
commitaf556238ebe72d58adbcf339bd2fa0aef4e3caf9
treed24c987a814eb8fcf6d623dae846852b4099c3ce
parentadcae006d250e40d7369d9bee3ecd05915acb22d
syntax: Allow semi tokens after macro ty/path

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
    }
src/libsyntax/ext/tt/macro_rules.rs
src/test/run-pass/semi-after-macro-ty.rs [new file with mode: 0644]