2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/pub-restricted.rs:5:6
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | pub (a) fn afn() {} //~ incorrect visibility restriction
|
2017-04-25 11:35:04 +00:00
|
|
|
| ^ help: make this visible only to module `a` with `in`: `in a`
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
|
|
|
= help: some possible 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
|
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/pub-restricted.rs:6:6
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | pub (b) fn bfn() {} //~ incorrect visibility restriction
|
2017-04-25 11:35:04 +00:00
|
|
|
| ^ help: make this visible only to module `b` with `in`: `in b`
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
|
|
|
= help: some possible 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
|
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/pub-restricted.rs:22:14
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | pub (a) invalid: usize, //~ incorrect visibility restriction
|
2017-04-25 11:35:04 +00:00
|
|
|
| ^ help: make this visible only to module `a` with `in`: `in a`
|
2017-03-27 11:59:10 +00:00
|
|
|
|
|
|
|
|
= help: some possible 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
|
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/pub-restricted.rs:31:6
|
2017-03-27 11:59:10 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction
|
2017-04-25 11:35:04 +00:00
|
|
|
| ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
|
|
|
= help: some possible 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
|
|
|
|
|
|
|
|
error: visibilities can only be restricted to ancestor modules
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/pub-restricted.rs:23:17
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted
|
2017-03-18 04:13:00 +00:00
|
|
|
| ^
|
|
|
|
|
2017-07-02 10:49:30 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2017-03-18 04:13:00 +00:00
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
For more information about this error, try `rustc --explain E0704`.
|