-
Couldn't load subscription status.
- Fork 13.9k
Update syntax for pub(restricted)
#40340
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
Conversation
|
@bors r+ oh yeah, I totally forgot this hadn't been done! ha. |
|
📌 Commit eaa706d has been approved by |
|
🔒 Merge conflict |
|
@bors: retry |
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
eaa706d to
880262a
Compare
|
@bors: r=nikomatsakis |
|
📌 Commit 880262a has been approved by |
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
Update syntax for `pub(restricted)` Update the syntax before stabilization. cc #32409 r? @nikomatsakis
|
☀️ Test successful - status-appveyor, status-travis |
…nkov
Add diagnostic for incorrect `pub (restriction)`
Given the following statement
```rust
pub (a) fn afn() {}
```
Provide the following diagnostic:
```rust
error: incorrect restriction in `pub`
--> file.rs:15:1
|
15 | pub (a) fn afn() {}
| ^^^
|
= help: some valid visibility restrictions are:
`pub(crate)`: visible only on the current crate
`pub(super)`: visible only in the current module's parent
`pub(in path::to::module)`: visible only on the specified path
help: to make this visible only to module `a`, add `in` before the path:
| pub (in a) fn afn() {}
```
Follow up to rust-lang#40340, fix rust-lang#40599, cc rust-lang#32409.
Update the syntax before stabilization.
cc #32409
r? @nikomatsakis