about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-03-17 21:13:00 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-03-22 22:51:45 -0700
commit769b95dc9f92edb51146727813ea7eae00b5b651 (patch)
treea60a4d858701b14f3e8c67a36187c24977d2f306 /src/rustllvm/PassWrapper.cpp
parent8c4f2c64c6759a82f143e23964a46a65c67509c9 (diff)
downloadrust-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