8e74842089
Special treatment like this was necessary before `pub(restricted)` had been implemented and only two visibilities existed - `pub` and non-`pub`. Now it's no longer necessary and the desired behavior follows from `pub(restricted)`-style visibilities naturally assigned to enum variants and trait items.
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
error[E0364]: `V` is private, and cannot be re-exported
|
|
--> $DIR/private-variant-reexport.rs:2:13
|
|
|
|
|
LL | pub use ::E::V;
|
|
| ^^^^^^
|
|
|
|
|
note: consider marking `V` as `pub` in the imported module
|
|
--> $DIR/private-variant-reexport.rs:2:13
|
|
|
|
|
LL | pub use ::E::V;
|
|
| ^^^^^^
|
|
|
|
error[E0364]: `V` is private, and cannot be re-exported
|
|
--> $DIR/private-variant-reexport.rs:6:19
|
|
|
|
|
LL | pub use ::E::{V};
|
|
| ^
|
|
|
|
|
note: consider marking `V` as `pub` in the imported module
|
|
--> $DIR/private-variant-reexport.rs:6:19
|
|
|
|
|
LL | pub use ::E::{V};
|
|
| ^
|
|
|
|
error[E0365]: `V` is private, and cannot be re-exported
|
|
--> $DIR/private-variant-reexport.rs:10:22
|
|
|
|
|
LL | pub use ::E::V::{self};
|
|
| ^^^^ re-export of private `V`
|
|
|
|
|
= note: consider declaring type or module `V` with `pub`
|
|
|
|
error: glob import doesn't reexport anything because no candidate is public enough
|
|
--> $DIR/private-variant-reexport.rs:15:13
|
|
|
|
|
LL | pub use ::E::*;
|
|
| ^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/private-variant-reexport.rs:13:8
|
|
|
|
|
LL | #[deny(unused_imports)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
Some errors have detailed explanations: E0364, E0365.
|
|
For more information about an error, try `rustc --explain E0364`.
|