Skip to content

allow macro expansions in attributes #19427

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

Merged
merged 3 commits into from
Dec 2, 2014
Merged

Conversation

scialex
Copy link
Contributor

@scialex scialex commented Nov 30, 2014

this allows one to, for example, use #[doc = $macro_var ] in macros.

@erickt
Copy link
Contributor

erickt commented Dec 1, 2014

Awesome! Could you add a test for this? r=erickt once added.

@scialex
Copy link
Contributor Author

scialex commented Dec 1, 2014

@erickt Added a test. I'm not really sure what sort of test you would like TBH.

Running make check now.

r=erickt

@sfackler
Copy link
Member

sfackler commented Dec 1, 2014

It'd also be nice to have a compile-fail test to make sure that a bare #[foo = $bar] outside of a macro definition doesn't compile.

@scialex
Copy link
Contributor Author

scialex commented Dec 2, 2014

@sfackler done

bors added a commit that referenced this pull request Dec 2, 2014
this allows one to, for example, use #[doc = $macro_var ] in macros.
@bors bors closed this Dec 2, 2014
@bors bors merged commit d3bbfb4 into rust-lang:master Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants