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

resolve: Functions introducing procedural macros reserve a slot in the macro namespace as well #52383

Merged
merged 1 commit into from
Jul 15, 2018

Conversation

petrochenkov
Copy link
Contributor

Similarly to #52234, this gives us symmetry between internal and external views of a crate, but in this case it's always an error to call a procedural macro in the same crate in which it's defined.

Closes #52225

@rust-highfive
Copy link
Collaborator

r? @eddyb

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 14, 2018
@petrochenkov
Copy link
Contributor Author

r? @alexcrichton

cc @alercah
some people from @rust-lang/lang may be interested in this as well

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Jul 14, 2018
@joshtriplett
Copy link
Member

Seems plausible to me.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 15, 2018

📌 Commit 431aefb has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2018
@bors
Copy link
Contributor

bors commented Jul 15, 2018

⌛ Testing commit 431aefb with merge 82e5c9c...

bors added a commit that referenced this pull request Jul 15, 2018
resolve: Functions introducing procedural macros reserve a slot in the macro namespace as well

Similarly to #52234, this gives us symmetry between internal and external views of a crate, but in this case it's always an error to call a procedural macro in the same crate in which it's defined.

Closes #52225
@bors
Copy link
Contributor

bors commented Jul 15, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 82e5c9c to master...

@bors bors merged commit 431aefb into rust-lang:master Jul 15, 2018
@petrochenkov petrochenkov deleted the pmns branch June 5, 2019 16:10
petrochenkov added a commit to petrochenkov/rust that referenced this pull request Jul 10, 2019
It's internal to resolve and always results in `Res::Err` outside of resolve.
Instead put `DefKind::Fn`s themselves into the macro namespace, it's ok.

Proc macro stubs are items placed into macro namespase for functions that define proc macros.
rust-lang#52383

The rustdoc test is changed because the old test didn't actually reproduce the ICE it was supposed to reproduce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants