Skip to content

syntax: Allow semi tokens after macro ty/path#27000

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:semi-after-type
Jul 13, 2015
Merged

syntax: Allow semi tokens after macro ty/path#27000
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:semi-after-type

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

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
}

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
    }
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@sfackler

Copy link
Copy Markdown
Member

LGTM - I believe @cmr is the follow token czar though.

@emberian

Copy link
Copy Markdown
Contributor

Looking.

@emberian

Copy link
Copy Markdown
Contributor

👍, could you also send a PR to update the RFC text here

@emberian

Copy link
Copy Markdown
Contributor

@bors: r+ rollup

@bors

bors commented Jul 13, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit af55623 has been approved by cmr

@bors

bors commented Jul 13, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit af55623 with merge 9ff2d19...

bors added a commit that referenced this pull request Jul 13, 2015
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
    }
@bors

bors commented Jul 13, 2015

Copy link
Copy Markdown
Collaborator

@bors bors merged commit af55623 into rust-lang:master Jul 13, 2015
alexcrichton added a commit to alexcrichton/rfcs that referenced this pull request Jul 13, 2015
@alexcrichton alexcrichton deleted the semi-after-type branch July 17, 2015 18:46
@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants