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 `pub(restricted)` privacy (RFC #1422) #32409
Comments
nikomatsakis
added
B-RFC-approved
T-lang
B-unstable
labels
Mar 21, 2016
This comment has been minimized.
This comment has been minimized.
|
You probably meant rust-lang/rfcs#1422 |
This comment has been minimized.
This comment has been minimized.
|
@jonas-schievink indeed. :) |
This was referenced Apr 3, 2016
This comment has been minimized.
This comment has been minimized.
|
How to parse If we try to parse Similar cases with simpler disambiguation:
Note that I suppose everything here can be disambiguated, but I'm concerned about the conflict |
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov sigh. a very good point. @pnkfelix and I were chatting-- one obvious (but not particularly appealing) option would be to say that tuple structs just can't use We considered various other synaxes one could use:
One consideration is that I expect most people will want to either make fields |
This comment has been minimized.
This comment has been minimized.
|
For reference, @nikomatsakis is referring to #1506. |
This comment has been minimized.
This comment has been minimized.
|
On Sun, Apr 3, 2016 at 5:52 AM, Vadim Petrochenkov <notifications@github.com
|
bors
added a commit
that referenced
this issue
Apr 6, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 6, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 7, 2016
bors
added a commit
that referenced
this issue
Apr 7, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 7, 2016
jseyfried
referenced this issue
Apr 11, 2016
Merged
Implement `pub(restricted)` privacy (RFC 1422) #32875
bors
added a commit
that referenced
this issue
Apr 16, 2016
petrochenkov
referenced this issue
Apr 19, 2016
Closed
syntax: Always parse `pub ( path_start` in tuple structs as visibility #33100
This comment has been minimized.
This comment has been minimized.
|
So in the @rust-lang/lang meeting we discussed this problem, as well as the solution implemented in #33100. Our conclusion was that we really ought to explore the cover grammar approach described earlier by @petrochenkov here:
It is basically the only approach that lets restricted paths and tuple structs be fully integrated, without any artificial restrictions (like needing to convert to |
jseyfried
referenced this issue
Apr 23, 2016
Merged
Parse `pub(restricted)` visibilities on tuple struct fields #33161
bors
added a commit
that referenced
this issue
Apr 28, 2016
steveklabnik
referenced this issue
Jul 25, 2016
Closed
pub(restricted) produces misleading diagnostic for private type in public interface lint #33174
This comment has been minimized.
This comment has been minimized.
|
The ambiguous syntax has come up some more on rust-lang/rfcs#1575, where it interferes with the idea of having a "visibility matcher". Some proposals were made for alternative syntax options there:
Most of these were covered (and rejected) in my prior comment, but it is true that the lookahead requirement is onerous. |
This comment has been minimized.
This comment has been minimized.
|
We could always just use another keyword (
And all related variants... |
nrc
added
B-RFC-implemented
and removed
B-RFC-approved
labels
Aug 29, 2016
This was referenced Mar 15, 2017
This comment has been minimized.
This comment has been minimized.
|
Just to clarify with everyone: |
This comment has been minimized.
This comment has been minimized.
|
Yes |
estebank
added a commit
to estebank/rust
that referenced
this issue
Mar 18, 2017
estebank
referenced this issue
Mar 18, 2017
Merged
Add diagnostic for incorrect `pub (restriction)` #40627
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 20, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 21, 2017
bors
closed this
in
#40556
Mar 21, 2017
This comment has been minimized.
This comment has been minimized.
|
This probably shouldn't have been closed since the documentation hasn't landed yet. |
eddyb
reopened this
Mar 23, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 23, 2017
anatol
pushed a commit
to anatol/steed
that referenced
this issue
Mar 31, 2017
This comment has been minimized.
This comment has been minimized.
|
I believe this is only waiting on docs, and I believe all the docs have made it. Can this be stabilized? |
This comment has been minimized.
This comment has been minimized.
|
This was stabilized a month ago, the only remaining bit is the Rust-by-example PR that's not merged yet. |
petrochenkov
closed this
Apr 25, 2017
This comment has been minimized.
This comment has been minimized.
|
Ah excellent; I was going to say, sad if it had just missed a release. |
This comment has been minimized.
This comment has been minimized.
|
I thought it did miss the release-- it was beta nominated for a bit, but that got cancelled IIRC. |
This comment has been minimized.
This comment has been minimized.
|
Just checked in the playground-- it stabilizes in 1.18. |
nikomatsakis commentedMar 21, 2016
•
edited by petrochenkov
Tracking issue for rust-lang/rfcs#1422
RFC text
Milestones: