Skip to content
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

Update syntax for pub(restricted) #40340

Merged
merged 1 commit into from
Mar 12, 2017
Merged

Conversation

petrochenkov
Copy link
Contributor

Update the syntax before stabilization.

cc #32409
r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r+

oh yeah, I totally forgot this hadn't been done! ha.

@bors
Copy link
Contributor

bors commented Mar 8, 2017

📌 Commit eaa706d has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 9, 2017

🔒 Merge conflict

@alexcrichton
Copy link
Member

@bors: retry

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2017
…akis

Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc rust-lang#32409
r? @nikomatsakis
alexcrichton pushed a commit to arielb1/rust that referenced this pull request Mar 10, 2017
…akis

Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc rust-lang#32409
r? @nikomatsakis
@alexcrichton
Copy link
Member

@bors: r=nikomatsakis

@bors
Copy link
Contributor

bors commented Mar 10, 2017

📌 Commit 880262a has been approved by nikomatsakis

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2017
…akis

Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc rust-lang#32409
r? @nikomatsakis
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 10, 2017
…akis

Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc rust-lang#32409
r? @nikomatsakis
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 10, 2017
…akis

Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc rust-lang#32409
r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Mar 12, 2017

⌛ Testing commit 880262a with merge f88b24b...

bors added a commit that referenced this pull request Mar 12, 2017
Update syntax for `pub(restricted)`

Update the syntax before stabilization.

cc #32409
r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Mar 12, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing f88b24b to master...

@bors bors merged commit 880262a into rust-lang:master Mar 12, 2017
@petrochenkov petrochenkov deleted the restricted branch March 16, 2017 19:42
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 23, 2017
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants