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

MACRO: parse bool literals as ident fragment or metavar name #6281

Merged
merged 2 commits into from Oct 21, 2020

Conversation

vlad20012
Copy link
Member

@vlad20012 vlad20012 commented Oct 21, 2020

Fixes #6274

Expand these cases:

macro_rules! foo {
    ($i:ident ) => {
        pub mod arm;
    }
}

foo!(false);

macro_rules! bar {
    ($true:ident ) => {
        fn $true() {}
    }
}

bar!(baz);

@vlad20012 vlad20012 added the fix Pull requests that fix some bug(s) label Oct 21, 2020
@vlad20012 vlad20012 added this to In Progress in To test via automation Oct 21, 2020
@vlad20012 vlad20012 added this to the v134 milestone Oct 21, 2020
@vlad20012
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 21, 2020

Build succeeded:

@bors bors bot merged commit 4f83a96 into master Oct 21, 2020
To test automation moved this from In Progress to Test Oct 21, 2020
@bors bors bot deleted the macro-fix-bool-literals branch October 21, 2020 19:18
@lancelote lancelote moved this from Test to Done in To test Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

Macro expansion breaks when "true" or "false" is passed as an ident parameter.
1 participant