diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-23 08:42:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-23 08:42:46 -0500 |
| commit | 640dbbdd3aa6146a7ec547ef421f6270399827ca (patch) | |
| tree | 274237e1235c526a681dfef0839c8be6b1d6eaa6 /src/rustllvm/PassWrapper.cpp | |
| parent | 4e962422d7346d4d1d1fd01a10b9964e7c2d7756 (diff) | |
| parent | 769b95dc9f92edb51146727813ea7eae00b5b651 (diff) | |
| download | rust-640dbbdd3aa6146a7ec547ef421f6270399827ca.tar.gz rust-640dbbdd3aa6146a7ec547ef421f6270399827ca.zip | |
Rollup merge of #40627 - estebank:pub-restricted, r=petrochenkov
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 #40340, fix #40599, cc #32409.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
