Skip to content

Conversation

kmcallister
Copy link
Contributor

It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a

[breaking-change]

but is landing without an RFC. The pub keyword previously had no effect, which seems quite unintended.

Fixes #18317.
Fixes #14660.

@rust-highfive
Copy link
Contributor

r? @nick29581

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

@nrc
Copy link
Member

nrc commented Feb 13, 2015

I'd like an rpass test that has a pub item inside the macro body (I'm sure this will pass now, but it seems like something that could be broken by a different implementation). r+ with that.

It's not clear what this means, because a macro in item position can expand to
zero or more items.  For now we disallow it, which is technically a

    [breaking-change]

but is landing without an RFC.  The `pub` keyword previously had no effect,
which seems quite unintended.

Fixes rust-lang#18317.
Fixes rust-lang#14660.
@kmcallister
Copy link
Contributor Author

@bors r=nick29581 dcd4cef

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 15, 2015
 It's not clear what this means, because a macro in item position can expand to zero or more items.  For now we disallow it, which is technically a

    [breaking-change]

but is landing without an RFC.  The `pub` keyword previously had no effect, which seems quite unintended.

Fixes rust-lang#18317.
Fixes rust-lang#14660.
@bors bors merged commit dcd4cef into rust-lang:master Feb 16, 2015
@ghost ghost mentioned this pull request Sep 20, 2015
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.

Problem with pub keyword in macros pub silently dropped from nested item macro invocation
4 participants