2019-08-05 09:50:37 -05:00
|
|
|
error[E0433]: failed to resolve: maybe a missing crate `bad`?
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:50:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub(in bad::path) mod m1 {}
|
2019-08-05 09:50:37 -05:00
|
|
|
| ^^^ maybe a missing crate `bad`?
|
2022-05-21 21:48:35 -05:00
|
|
|
|
|
|
|
|
= help: consider adding `extern crate bad` to use the `bad` crate
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-10-29 07:59:22 -05:00
|
|
|
error[E0742]: visibilities can only be restricted to ancestor modules
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:51:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub(in foo) mod m2 {}
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error[E0364]: `f` is private, and cannot be re-exported
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:21:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub(super) use foo::bar::f as g;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: consider marking `f` as `pub` in the imported module
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:21:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub(super) use foo::bar::f as g;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0603]: struct `Crate` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:38:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use pub_restricted::Crate;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^^ private struct
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the struct `Crate` is defined here
|
2022-05-20 20:06:44 -05:00
|
|
|
--> $DIR/auxiliary/pub_restricted.rs:1:1
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
LL | pub(crate) struct Crate;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0603]: function `f` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:30:19
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use foo::bar::f;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^ private function
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the function `f` is defined here
|
|
|
|
--> $DIR/test.rs:8:9
|
|
|
|
|
|
|
|
|
LL | pub(super) fn f() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0616]: field `x` of struct `S` is private
|
2020-03-22 13:18:06 -05:00
|
|
|
--> $DIR/test.rs:31:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | S::default().x;
|
2020-03-22 13:18:06 -05:00
|
|
|
| ^ private field
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-02-21 15:11:08 -06:00
|
|
|
error[E0624]: method `f` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:32:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2021-07-17 13:13:50 -05:00
|
|
|
LL | pub(super) fn f(&self) {}
|
2023-02-21 15:11:08 -06:00
|
|
|
| ---------------------- private method defined here
|
2021-07-17 13:13:50 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | S::default().f();
|
2023-02-21 15:11:08 -06:00
|
|
|
| ^ private method
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-03-04 21:03:15 -06:00
|
|
|
error[E0624]: associated function `g` is private
|
2020-03-22 18:09:42 -05:00
|
|
|
--> $DIR/test.rs:33:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2021-07-17 13:13:50 -05:00
|
|
|
LL | pub(super) fn g() {}
|
|
|
|
| ----------------- private associated function defined here
|
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | S::g();
|
2020-03-22 18:09:42 -05:00
|
|
|
| ^ private associated function
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0616]: field `y` of struct `Universe` is private
|
2020-03-22 13:18:06 -05:00
|
|
|
--> $DIR/test.rs:42:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let _ = u.y;
|
2020-03-22 13:18:06 -05:00
|
|
|
| ^ private field
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0616]: field `z` of struct `Universe` is private
|
2020-03-22 13:18:06 -05:00
|
|
|
--> $DIR/test.rs:43:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let _ = u.z;
|
2020-03-22 13:18:06 -05:00
|
|
|
| ^ private field
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-02-21 15:11:08 -06:00
|
|
|
error[E0624]: method `g` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:45:7
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | u.g();
|
2023-02-21 15:11:08 -06:00
|
|
|
| ^ private method
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2022-05-20 20:06:44 -05:00
|
|
|
::: $DIR/auxiliary/pub_restricted.rs:12:5
|
2021-07-17 13:13:50 -05:00
|
|
|
|
|
|
|
|
LL | pub(crate) fn g(&self) {}
|
2023-02-21 15:11:08 -06:00
|
|
|
| ---------------------- private method defined here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-02-21 15:11:08 -06:00
|
|
|
error[E0624]: method `h` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/test.rs:46:7
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | u.h();
|
2023-02-21 15:11:08 -06:00
|
|
|
| ^ private method
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2022-05-20 20:06:44 -05:00
|
|
|
::: $DIR/auxiliary/pub_restricted.rs:13:5
|
2021-07-17 13:13:50 -05:00
|
|
|
|
|
2022-05-20 20:06:44 -05:00
|
|
|
LL | pub(crate) fn h(&self) {}
|
2023-02-21 15:11:08 -06:00
|
|
|
| ---------------------- private method defined here
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
|
|
|
|
2019-10-29 07:59:22 -05:00
|
|
|
Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0742.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0364`.
|