mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
26 lines
524 B
Rust
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::*;
|