rust/tests/ui/privacy/auxiliary/ctor_aux.rs
2024-02-16 20:02:50 +00:00

26 lines
524 B
Rust

//@ edition:2021
//! Missing docs lint warns about undocumented exported items.
//! Use the lint to additionally verify that items are reachable
//! but not exported.
#![allow(non_camel_case_types)]
#![deny(missing_docs)]
mod hidden {
pub struct s;
pub enum e { x, y, z }
pub use e::*;
impl s {
pub fn f(&self) {}
}
impl e {
pub fn g(&self) {}
}
}
// Hide all type definitions while reexporting their constructors:
mod e {}
mod x {}
mod y {}
mod z {}
mod s {}
pub use hidden::*;