1 // Even if allows private_in_public, these are errors. 2 3 #![allow(private_in_public)] 4 5 pub enum PublicEnum { 6 V(PrivateEnum), //~ ERROR E0446 7 } 8 9 enum PrivateEnum { 10 V(u8), 11 } 12 13 mod foo { 14 pub(crate) enum CrateEnum { 15 V(PrivateEnum), //~ ERROR E0446 16 } 17 18 enum PrivateEnum { 19 V(u8), 20 } 21 } 22 main()23fn main() {} 24