-
Notifications
You must be signed in to change notification settings - Fork 888
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
pub(in path), pub(super), and pub(self) are broken #2398
Labels
bug
Panic, non-idempotency, invalid code, etc.
Comments
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Feb 16, 2018
… r=petrochenkov Fix span of visibility This PR 1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`. 2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`. This PR is motivated by the bug found in rustfmt (rust-lang/rustfmt#2398). The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Feb 17, 2018
… r=petrochenkov Fix span of visibility This PR 1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`. 2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`. This PR is motivated by the bug found in rustfmt (rust-lang/rustfmt#2398). The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
bors
added a commit
to rust-lang/rust
that referenced
this issue
Feb 19, 2018
…nkov Fix span of visibility This PR 1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`. 2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`. This PR is motivated by the bug found in rustfmt (rust-lang/rustfmt#2398). The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
bors
added a commit
to rust-lang/rust
that referenced
this issue
Feb 23, 2018
…nkov Fix span of visibility This PR 1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`. 2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`. This PR is motivated by the bug found in rustfmt (rust-lang/rustfmt#2398). The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
This should be fixed now and just needs a test |
Not quite: we need to update |
topecongiro
added a commit
to topecongiro/rustfmt
that referenced
this issue
Mar 6, 2018
topecongiro
added a commit
to topecongiro/rustfmt
that referenced
this issue
Mar 6, 2018
`ast::Visibility` is changed to `codemap::Spanned` whose node is `ast::VisibilityKind`. This commit fixes it. Closes rust-lang#2398.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example from Visibility and Privacy in the reference:
Before
After
version:
0.3.6-nightly (dfc67a5d 2018-01-26)
The text was updated successfully, but these errors were encountered: