2017-03-17 23:13:00 -05:00
|
|
|
error: incorrect visibility restriction
|
2017-03-27 06:59:10 -05:00
|
|
|
--> $DIR/pub-restricted.rs:15:6
|
2017-03-17 23:13:00 -05:00
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
15 | pub (a) fn afn() {} //~ incorrect visibility restriction
|
2017-04-25 06:35:04 -05:00
|
|
|
| ^ help: make this visible only to module `a` with `in`: `in a`
|
2017-03-17 23:13:00 -05: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: incorrect visibility restriction
|
2017-03-27 06:59:10 -05:00
|
|
|
--> $DIR/pub-restricted.rs:16:6
|
2017-03-17 23:13:00 -05:00
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
16 | pub (b) fn bfn() {} //~ incorrect visibility restriction
|
2017-04-25 06:35:04 -05:00
|
|
|
| ^ help: make this visible only to module `b` with `in`: `in b`
|
2017-03-17 23:13:00 -05: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: incorrect visibility restriction
|
2017-03-27 06:59:10 -05:00
|
|
|
--> $DIR/pub-restricted.rs:32:14
|
2017-03-17 23:13:00 -05:00
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
32 | pub (a) invalid: usize, //~ incorrect visibility restriction
|
2017-04-25 06:35:04 -05:00
|
|
|
| ^ help: make this visible only to module `a` with `in`: `in a`
|
2017-03-27 06:59:10 -05: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: incorrect visibility restriction
|
|
|
|
--> $DIR/pub-restricted.rs:41:6
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
41 | pub (xyz) fn xyz() {} //~ incorrect visibility restriction
|
2017-04-25 06:35:04 -05:00
|
|
|
| ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
|
2017-03-17 23:13:00 -05: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
|
|
|
|
--> $DIR/pub-restricted.rs:33:17
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
33 | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted
|
2017-03-17 23:13:00 -05:00
|
|
|
| ^
|
|
|
|
|
2017-07-02 05:49:30 -05:00
|
|
|
error: aborting due to 5 previous errors
|
2017-03-17 23:13:00 -05:00
|
|
|
|