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 span_open() and span_close(). #86136

Merged
merged 1 commit into from Jun 19, 2021

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jun 8, 2021

This proposes to stabilize Group::span_open() and Group::span_close().

These are part of the proc_macro_span feature gate tracked in #54725

Most of the features gated behind proc_macro_span are about source location information (file path, line and column information), expansion information (parent()), source_text(), etc. Those are not ready for stabilizaiton. However, getting the span of the ( and ) separately instead of only of the entire (...) can be very useful in proc macros, and doesn't seem blocked on anything that all the other parts of proc_macro_span are blocked on. So, this renames the feature gate for those two functions to proc_macro_group_span and stabilizes them.

@m-ou-se m-ou-se added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. A-proc-macros Area: Procedural macros labels Jun 8, 2021
@m-ou-se m-ou-se self-assigned this Jun 8, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 8, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jun 8, 2021

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Jun 8, 2021

Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jun 8, 2021
@jonas-schievink jonas-schievink added the relnotes Marks issues that should be documented in the release notes of the next release. label Jun 8, 2021
@Aaron1011
Copy link
Member

cc @petrochenkov

@petrochenkov
Copy link
Contributor

Seems fine.
Looks like the result is produced on best effort basis, and it actually points to the whole group for all groups created with proc macro API (as opposed to lexer), so we don't make any significant promises by stabilizing this.

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jun 8, 2021
@rfcbot
Copy link

rfcbot commented Jun 8, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@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 Jun 18, 2021
@rfcbot
Copy link

rfcbot commented Jun 18, 2021

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 the to-announce Announce this issue on triage meeting label Jun 18, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jun 18, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 18, 2021

📌 Commit 6288aad has been approved by m-ou-se

@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 Jun 18, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 19, 2021
… r=m-ou-se

Stabilize span_open() and span_close().

This proposes to stabilize `Group::span_open()` and `Group::span_close()`.

These are part of the `proc_macro_span` feature gate tracked in rust-lang#54725

Most of the features gated behind `proc_macro_span` are about source location information (file path, line and column information), expansion information (parent()), source_text(), etc. Those are not ready for stabilizaiton. However, getting the span of the `(` and `)` separately instead of only of the entire `(...)` can be very useful in proc macros, and doesn't seem blocked on anything that all the other parts of `proc_macro_span` are blocked on. So, this renames the feature gate for those two functions to `proc_macro_group_span` and stabilizes them.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#86136 (Stabilize span_open() and span_close().)
 - rust-lang#86359 (Use as_secs_f64 in JunitFormatter)
 - rust-lang#86370 (Fix rustdoc stabilized versions layout)
 - rust-lang#86397 (Alter std::cell::Cell::get_mut documentation)
 - rust-lang#86407 (Use `map_or` instead of open-coding it)
 - rust-lang#86425 (Update rustversion to 1.0.5)
 - rust-lang#86440 (Update library tracking issue for libs-api rename.)
 - rust-lang#86444 (Fix ICE with `#[repr(simd)]` on enum)
 - rust-lang#86453 (stdlib: Fix typo in internal RefCell docs )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aa22799 into rust-lang:master Jun 19, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 19, 2021
@m-ou-se m-ou-se deleted the proc-macro-open-close-span branch June 19, 2021 11:25
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jul 1, 2021
@jplatte jplatte mentioned this pull request Jul 2, 2021
65 tasks
@pthariensflame
Copy link
Contributor

@XAMPPRocky This isn’t in current relnotes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-proc-macros Area: Procedural macros 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. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. 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-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants