blob: 596264ba16b424ef82d282278f86d1d12766e078 [file] [log] [blame]
error[E0704]: incorrect visibility restriction
--> $DIR/pub-restricted.rs:5:6
|
LL | pub (a) fn afn() {}
| ^ help: make this visible only to module `a` with `in`: `in a`
|
= 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[E0704]: incorrect visibility restriction
--> $DIR/pub-restricted.rs:6:6
|
LL | pub (b) fn bfn() {}
| ^ help: make this visible only to module `b` with `in`: `in b`
|
= 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[E0704]: incorrect visibility restriction
--> $DIR/pub-restricted.rs:7:6
|
LL | pub (crate::a) fn cfn() {}
| ^^^^^^^^ help: make this visible only to module `crate::a` with `in`: `in crate::a`
|
= 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[E0704]: incorrect visibility restriction
--> $DIR/pub-restricted.rs:24:14
|
LL | pub (a) invalid: usize,
| ^ help: make this visible only to module `a` with `in`: `in a`
|
= 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[E0704]: incorrect visibility restriction
--> $DIR/pub-restricted.rs:33:6
|
LL | pub (xyz) fn xyz() {}
| ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
|
= 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:25:17
|
LL | pub (in x) non_parent_invalid: usize,
| ^
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0704`.