The following code compiles without warnings: ``` rust #[allow(dead_code)] enum Foo { pub Spam, Eggs } fn main() { } ``` I guess that this should be forbidden, because enum vairants inherit visibility of the enum itself. At minimum, this should produce a warning. This is the relevant line from parser: https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs#L5203 This is the discussion on Rust forum: https://users.rust-lang.org/t/confused-about-enum-variants-visibility/2873