Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 13, 2015

Conversation

alexcrichton
Copy link
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
Collaborator

r? @sfackler

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

@sfackler
Copy link
Member

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

@emberian
Copy link
Member

Looking.

@emberian
Copy link
Member

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

@emberian
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 13, 2015

📌 Commit af55623 has been approved by cmr

@bors
Copy link
Contributor

bors commented Jul 13, 2015

⌛ 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 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