2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:3:6
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | pub (a) fn afn() {}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^
|
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
|
2024-07-06 03:07:46 +00:00
|
|
|
help: make this visible only to module `a` with `in`
|
|
|
|
|
|
|
|
|
LL | pub (in a) fn afn() {}
|
|
|
|
| ~~~~
|
2017-03-18 04:13:00 +00:00
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:4:6
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | pub (b) fn bfn() {}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^
|
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
|
2024-07-06 03:07:46 +00:00
|
|
|
help: make this visible only to module `b` with `in`
|
|
|
|
|
|
|
|
|
LL | pub (in b) fn bfn() {}
|
|
|
|
| ~~~~
|
2017-03-18 04:13:00 +00:00
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:5:6
|
2019-05-01 00:48:18 +00:00
|
|
|
|
|
|
|
|
LL | pub (crate::a) fn cfn() {}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^^^^^^
|
2019-05-01 00:48:18 +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
|
2024-07-06 03:07:46 +00:00
|
|
|
help: make this visible only to module `crate::a` with `in`
|
|
|
|
|
|
|
|
|
LL | pub (in crate::a) fn cfn() {}
|
|
|
|
| ~~~~~~~~~~~
|
2019-05-01 00:48:18 +00:00
|
|
|
|
|
|
|
error[E0704]: incorrect visibility restriction
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:22:14
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | pub (a) invalid: usize,
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^
|
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
|
2024-07-06 03:07:46 +00:00
|
|
|
help: make this visible only to module `a` with `in`
|
|
|
|
|
|
|
|
|
LL | pub (in a) invalid: usize,
|
|
|
|
| ~~~~
|
2017-03-27 11:59:10 +00:00
|
|
|
|
2018-06-19 23:22:37 +00:00
|
|
|
error[E0704]: incorrect visibility restriction
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:31:6
|
2017-03-27 11:59:10 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | pub (xyz) fn xyz() {}
|
2024-07-06 03:07:46 +00:00
|
|
|
| ^^^
|
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
|
2024-07-06 03:07:46 +00:00
|
|
|
help: make this visible only to module `xyz` with `in`
|
|
|
|
|
|
|
|
|
LL | pub (in xyz) fn xyz() {}
|
|
|
|
| ~~~~~~
|
2017-03-18 04:13:00 +00:00
|
|
|
|
2019-10-29 12:59:22 +00:00
|
|
|
error[E0742]: visibilities can only be restricted to ancestor modules
|
2022-01-19 15:24:49 +00:00
|
|
|
--> $DIR/pub-restricted.rs:23:17
|
2017-03-18 04:13:00 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | pub (in x) non_parent_invalid: usize,
|
2017-03-18 04:13:00 +00:00
|
|
|
| ^
|
|
|
|
|
2019-05-01 00:48:18 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2017-03-18 04:13:00 +00:00
|
|
|
|
2019-10-29 12:59:22 +00:00
|
|
|
Some errors have detailed explanations: E0704, E0742.
|
2019-10-14 12:07:05 +00:00
|
|
|
For more information about an error, try `rustc --explain E0704`.
|