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

Stabilize attribute macros on inline modules #64273

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

petrochenkov
Copy link
Contributor

While still gating non-inline modules in proc macro input.

Split from #63931
cc #54727

@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 Sep 7, 2019
@petrochenkov
Copy link
Contributor Author

Stabilization report

Macro attributes are now supported on inline module items (mod m { ... }), the behavior is the same as for attributes on any other items available on stable.

The feature is a part of the franken-feature #![feature(proc_macro_hygiene)].
The feature was implemented together with all other proc macro attributes on items somewhere in 2017-2018.
Its current instability is a collateral damage from attributes on out-of-line modules, which actually have unresolved questions (like whether the mod file should be loaded before expanding the macro or after, and what should proc macros do if they need to load files themselves).

@rust-highfive

This comment has been minimized.

@petrochenkov
Copy link
Contributor Author

r? @Centril

@rust-highfive rust-highfive assigned Centril and unassigned eddyb Sep 9, 2019
@JohnCSimon

This comment has been minimized.

@jonas-schievink jonas-schievink added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 15, 2019
@jonas-schievink jonas-schievink added this to the 1.39 milestone Sep 15, 2019
@Centril
Copy link
Contributor

Centril commented Sep 19, 2019

(triage: I'll look at this PR during the weekend.)

@Centril Centril modified the milestones: 1.39, 1.40 Sep 26, 2019
@bors

This comment has been minimized.

Centril added a commit to Centril/rust that referenced this pull request Oct 1, 2019
Stabilize macros in some more positions

- Fn-like macros and attribute macros in `extern` blocks
- Fn-like procedural macros in type positions
- ~Attribute macros on inline modules~ (moved to rust-lang#64273)

Stabilization report: rust-lang#63931 (comment).

Closes rust-lang#49476
cc rust-lang#54727
Centril added a commit to Centril/rust that referenced this pull request Oct 1, 2019
Stabilize macros in some more positions

- Fn-like macros and attribute macros in `extern` blocks
- Fn-like procedural macros in type positions
- ~Attribute macros on inline modules~ (moved to rust-lang#64273)

Stabilization report: rust-lang#63931 (comment).

Closes rust-lang#49476
cc rust-lang#54727
@Centril
Copy link
Contributor

Centril commented Oct 1, 2019

Declaring reviewer bankruptcy on this PR (sorry!) and reassigning to r? @pnkfelix who is considering the macro related changes together.

(I'm a bit bummed by the visitor approach that is unfortunately necessary to land this. From a compiler POV it's trivial but from a spec POV it's not.)

@rust-highfive rust-highfive assigned pnkfelix and unassigned Centril Oct 1, 2019
@petrochenkov
Copy link
Contributor Author

I'm a bit bummed by the visitor approach that is unfortunately necessary to land this.

FWIW, that's the same approach that is used for gating macro-expanded macro_rules until #64035 lands.

@JohnCSimon

This comment has been minimized.

@petrochenkov

This comment has been minimized.

@joelpalmer

This comment has been minimized.

@Centril Centril added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Oct 14, 2019
@petrochenkov
Copy link
Contributor Author

petrochenkov commented Dec 13, 2019

Sigh, okay. (At least I tried.)

@petrochenkov petrochenkov added T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 13, 2019
@rfcbot
Copy link

rfcbot commented Dec 15, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Dec 15, 2019
@Centril Centril modified the milestones: 1.41, 1.42 Dec 20, 2019
@bors

This comment has been minimized.

@petrochenkov
Copy link
Contributor Author

r? @Centril

@rust-highfive rust-highfive assigned Centril and unassigned pnkfelix Dec 28, 2019
@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). needs-fcp This change is insta-stable, so needs a completed FCP to proceed. labels Dec 28, 2019
@Centril
Copy link
Contributor

Centril commented Dec 28, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 28, 2019

📌 Commit e3155ab has been approved by Centril

@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 Dec 28, 2019
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 29, 2019
Stabilize attribute macros on inline modules

While still gating non-inline modules in proc macro input.

Split from rust-lang#63931
cc rust-lang#54727
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 30, 2019
Stabilize attribute macros on inline modules

While still gating non-inline modules in proc macro input.

Split from rust-lang#63931
cc rust-lang#54727
bors added a commit that referenced this pull request Dec 30, 2019
Rollup of 10 pull requests

Successful merges:

 - #64273 (Stabilize attribute macros on inline modules)
 - #67287 (typeck: note other end-point when checking range pats)
 - #67564 (docs: Iterator adapters have unspecified results after a panic)
 - #67622 (Some keyword documentation.)
 - #67657 (Clean up const-hack PRs now that const if / match exist.)
 - #67677 (resolve: Minor cleanup of duplicate macro reexports)
 - #67687 (Do not ICE on lifetime error involving closures)
 - #67698 (Move reachable_set and diagnostic_items to librustc_passes.)
 - #67701 (tidy: Enforce formatting rather than just check it if `--bless` is specified)
 - #67715 (Typo fix)

Failed merges:

r? @ghost
@bors bors merged commit e3155ab into rust-lang:master Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.