error[E0433]: failed to resolve: maybe a missing `extern crate bad;`? --> $DIR/test.rs:50:12 | LL | pub(in bad::path) mod m1 {} | ^^^ maybe a missing `extern crate bad;`? error: visibilities can only be restricted to ancestor modules --> $DIR/test.rs:51:12 | LL | pub(in foo) mod m2 {} | ^^^ error[E0364]: `f` is private, and cannot be re-exported --> $DIR/test.rs:21:24 | LL | pub(super) use foo::bar::f as g; | ^^^^^^^^^^^^^^^^ | note: consider marking `f` as `pub` in the imported module --> $DIR/test.rs:21:24 | LL | pub(super) use foo::bar::f as g; | ^^^^^^^^^^^^^^^^ error[E0603]: struct `Crate` is private --> $DIR/test.rs:38:25 | LL | use pub_restricted::Crate; | ^^^^^ error[E0603]: function `f` is private --> $DIR/test.rs:30:19 | LL | use foo::bar::f; | ^ error[E0616]: field `x` of struct `foo::bar::S` is private --> $DIR/test.rs:31:5 | LL | S::default().x; | ^^^^^^^^^^^^^^ error[E0624]: method `f` is private --> $DIR/test.rs:32:18 | LL | S::default().f(); | ^ error[E0624]: method `g` is private --> $DIR/test.rs:33:5 | LL | S::g(); | ^^^^ error[E0616]: field `y` of struct `pub_restricted::Universe` is private --> $DIR/test.rs:42:13 | LL | let _ = u.y; | ^^^ error[E0616]: field `z` of struct `pub_restricted::Universe` is private --> $DIR/test.rs:43:13 | LL | let _ = u.z; | ^^^ error[E0624]: method `g` is private --> $DIR/test.rs:45:7 | LL | u.g(); | ^ error[E0624]: method `h` is private --> $DIR/test.rs:46:7 | LL | u.h(); | ^ error: aborting due to 12 previous errors Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624. For more information about an error, try `rustc --explain E0364`.