Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for adding a `lifetime` specifier to `macro_rules!` #34303
Comments
This comment has been minimized.
This comment has been minimized.
|
I'll open a new PR soon, I want to do one more thing on top of #33135 |
apasel422
added
the
B-RFC-approved
label
Jun 17, 2016
This comment has been minimized.
This comment has been minimized.
|
Godspeed, @sgrif! This being in nightly would make my week. |
bozaro
referenced this issue
Oct 20, 2016
Closed
A type representing an owned C-compatible wide string #1773
steveklabnik
referenced this issue
Nov 15, 2016
Closed
Can't use externally defined lifetimes in macros due to hygiene #23956
This comment has been minimized.
This comment has been minimized.
|
@sgrif Any update? |
brson
added
B-unstable
E-help-wanted
labels
Mar 1, 2017
This comment has been minimized.
This comment has been minimized.
|
This doesn't seem particularly hard. Help wanted. |
This comment has been minimized.
This comment has been minimized.
|
I wish we knew what the "one more thing" was besides just reopening the closed PR. |
This comment has been minimized.
This comment has been minimized.
|
I'd like to help implement this. Where do I start? |
This comment has been minimized.
This comment has been minimized.
|
@mikeyhew
This should be something truly marvelous, that this GitHub comment was too narrow to contain. |
jugglingcats
referenced this issue
May 19, 2017
Open
Using declare_types with explicit lifetime #207
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
bors
added a commit
that referenced
this issue
Jan 1, 2018
bors
closed this
in
#46895
Jan 1, 2018
This comment has been minimized.
This comment has been minimized.
|
This issue should remain open until the feature is stable, right? |
petrochenkov
reopened this
Jan 1, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Some alternatives are discussed in https://internals.rust-lang.org/t/pre-rfc-splitting-lifetime-into-two-tokens/6716 - either splitting lifetimes into two tokens, then they can be matched with I don't think it prevents stabilization of the |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge trying again |
nikomatsakis
added
the
T-lang
label
Mar 12, 2018
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp merge See @cramertj's brief summary here. |
rfcbot
added
the
proposed-final-comment-period
label
Mar 12, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 12, 2018
•
|
Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once a majority of reviewers approve (and none object), 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. |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot fcp concern @petrochenkov recently brought it to my attention that On the other hand, I can see an argument that not supporting |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot concern underscore-lifetime |
This comment has been minimized.
This comment has been minimized.
|
(Bother, I can never remember the dang syntax.) |
nikomatsakis
referenced this issue
Mar 15, 2018
Merged
syntax: Make `_` a reserved identifier #48842
This comment has been minimized.
This comment has been minimized.
|
If I understand correctly, '_ is going to become very common very soon
because elision on structs will be partially removed, meaning `struct
Foo<'a>(&'a str); fn bar(&str) -> Foo {...}` turns into `fn bar(&str) ->
Foo<'_>`. (Biting my tongue about my thoughts on that change because it's
irrelevant to this issue.) In that case I think users will be very confused
if `m!(Foo<'a>)` works but `m!(Foo<'_>)` doesn't. We are adding this
feature to make macros more flexible. You could still match '_ and 'a using
two rules (one with literal '_ and one with $lt:lifetime) but why throw up
that arbitrary barrier?
_ as ident is a separate thing but at least it does match as a pat.
…On Thu, Mar 15, 2018 at 12:32 PM, Niko Matsakis ***@***.***> wrote:
(Bother, I can never remember the dang syntax.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34303 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n2QjhQ2VQW3En09_RyWhNU_DluNzks5tepexgaJpZM4I3Wep>
.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis please say "resolved" for the bot |
This comment has been minimized.
This comment has been minimized.
|
@rfcbot resolved underscore-lifetime Sigh. |
rfcbot
added
final-comment-period
and removed
proposed-final-comment-period
labels
Mar 20, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 20, 2018
|
|
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 30, 2018
|
The final comment period is now complete. |
This comment has been minimized.
This comment has been minimized.
|
|
petrochenkov
referenced this issue
May 2, 2018
Closed
Tracking issue for macro :lifetime matcher #50380
bors
added a commit
that referenced
this issue
May 14, 2018
fluffyemily
referenced this issue
May 15, 2018
Open
Use `macro_rules` lifetime specifier when it lands in stable #702
Centril
added
disposition-merge
finished-final-comment-period
and removed
final-comment-period
labels
May 24, 2018
This comment has been minimized.
This comment has been minimized.
|
We don't have tests for a macro_rules falling through to the next rule after a $:lifetime matcher. And it doesn't work. |
jjedelsky
referenced this issue
Jun 10, 2018
Closed
Macro rules: using lifetime specifier inside recursion causes local ambiguity #50903
This comment has been minimized.
This comment has been minimized.
|
I think we can close this as it was stabilized; bugs and other things can be tracked as we usually do. |
nikomatsakis commentedJun 16, 2016
cc rust-lang/rfcs#1590 @sgrif