error[E0603]: enum `Y` is private --> $DIR/export-tag-variant.rs:7:26 | LL | fn main() { let z = foo::Y::Y1; } //~ ERROR: enum `Y` is private | ^ error: aborting due to previous error For more information about this error, try `rustc --explain E0603`.