diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/privacy/private-variant-reexport.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/privacy/private-variant-reexport.rs b/src/test/ui/privacy/private-variant-reexport.rs new file mode 100644 index 000000000..688284460 --- /dev/null +++ b/src/test/ui/privacy/private-variant-reexport.rs @@ -0,0 +1,20 @@ +mod m1 { + pub use ::E::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside +} + +mod m2 { + pub use ::E::{V}; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside +} + +mod m3 { + pub use ::E::V::{self}; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside +} + +#[deny(unused_imports)] +mod m4 { + pub use ::E::*; //~ ERROR glob import doesn't reexport anything +} + +enum E { V } + +fn main() {} |