diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-03-17 21:13:00 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-03-22 22:51:45 -0700 |
| commit | 769b95dc9f92edb51146727813ea7eae00b5b651 (patch) | |
| tree | a60a4d858701b14f3e8c67a36187c24977d2f306 /src/rustllvm/PassWrapper.cpp | |
| parent | 8c4f2c64c6759a82f143e23964a46a65c67509c9 (diff) | |
| download | rust-769b95dc9f92edb51146727813ea7eae00b5b651.tar.gz rust-769b95dc9f92edb51146727813ea7eae00b5b651.zip | |
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() {}
```
Remove cruft from old `pub(path)` syntax.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
