-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tracking issue for :vis
macro matcher
#41022
Comments
cc #41949 |
Is this mature enough to be stabilized? |
#45388 |
Shall we stabilize this? |
Team member @cramertj 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. |
I would like to see a comment pointing out the relevant tests so I can review the behavior. =) |
@rfcbot concern if we make further changes to the visibility modifiers as we continue to evolve the module system, will this cause back compat issues here? |
I would assume that `:vis` will continue to match whatever visibility
specifiers are added. Such further changes should be carefully designed to
avoid introducing ambiguities.
…On Wed, Jan 17, 2018 at 9:39 PM, Nick Cameron ***@***.***> wrote:
@rfcbot <https://github.com/rfcbot> concern if we make further changes to
the visibility modifiers as we continue to evolve the module system, will
this cause back compat issues here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#41022 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n525WWXDYbK-7vTJc8J9D2cVRXflks5tLq7tgaJpZM4Mw6bP>
.
|
I agree with @durka. This is definitely "a thing", but I think that to a large extend these ambiguities exist already. For example, introducing the |
@durka thanks for the examples. |
@nrc Was your concern adequately addressed, or do you have more questions? |
@cramertj it kind of does. However, we seem to be very close to settling on a final design for modules/visibility reform and it seems to me that waiting another month or so for that before stabilising would be beneficial. Consider the concern resolved if others don't think that meaningfully reduces risk. |
@nrc hmm -- actually -- now that you mention it =) So the main change there (which is not afaik controversial) is that we are going to add All that said, I'm still sort of inclined to go forward with |
The follow set is currently:
We may need to change rule 2 to exclude |
I can't say I appreciate the fatalistic attitude of "well, we're going to
break macros and assume there's no opposition". But in that case, perhaps
we *should* hold off stabilizing :vis until `crate` is a keyword?
…On Wed, Mar 7, 2018 at 2:03 PM, kennytm ***@***.***> wrote:
The follow set
<https://github.com/rust-lang/rust/blob/4cdbac639af2074b8a07b4391b4e3e28b4118487/src/libsyntax/ext/tt/macro_rules.rs#L847-L860>
is currently:
1. ,
2. all identifiers and keywords except priv
3. tokens that can_begin_type()
4. meta-var which is :ident, :ty or :path
We may need to change rule 2 to exclude crate. But why priv is outside of
the follow-set while pub is in it? Or is it just an oversight? 🤔
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41022 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n0P0McLIjEfhJJF5OJq2aDPyhnZQks5tcC7ygaJpZM4Mw6bP>
.
|
@durka |
Yes, I (and @nikomatsakis I guess) meant it is going to be accepted as a keyword in a new context. |
Sorry if I came off too blasé. I'm mostly just embittered with the situation, which I find quite frustrating -- we foresaw the problem, but our solution just didn't work. It annoys me, in part because the simpler solution that we originally had in mind would have worked fine. =) But clearly we are not going to allow this to stop us from modifying our grammar. I hope we can address in Macros 2.0 by changing how fragments work. As far as I know roughly the only scheme that works is to have
I think it's reasonable. |
Now that we've come closer to finalizing the modules system under the 2018 edition, do you feel more comfortable resolving your concern here? |
@rfcbot resolved if we make further changes to the visibility modifiers as we continue to evolve the module system, will this cause back compat issues here? (Assuming that |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
This is in need of a stabilization PR! There's a stabilization guide on the forge. Please post here if you plan to take this issue! (I'll circulate it around and see if anyone wants to take it as a good first or third PR) |
@cramertj as discussed, I would like to try my hand at doing the stabilisation PR. Will ping if I get stuck |
…her, r=cramertj Stabilize macro_vis_matcher This PR should stabilize [macro_vis_matcher](rust-lang#41022) feature. - [ ] "reference" book changes: rust-lang/reference#400 - [ ] "Rust by example" book changes: rust-lang/rust-by-example#1096 - [ ] "clippy" changes: rust-lang/rust-clippy#3055 r? @cramertj
This has been stabilized and the reference has been amended, so this seems done. |
I'm popping in here while trying to more fully document the follow-set rules in the reference, and the |
Tracks stabilization for accepting
:vis
as a fragment specifier in macros, gated by#![feature(macro_vis_matcher)]
.Introduced in #41012.
The text was updated successfully, but these errors were encountered: