From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/privacy/auxiliary/ctor_aux.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/ui/privacy/auxiliary/ctor_aux.rs (limited to 'tests/ui/privacy/auxiliary/ctor_aux.rs') diff --git a/tests/ui/privacy/auxiliary/ctor_aux.rs b/tests/ui/privacy/auxiliary/ctor_aux.rs new file mode 100644 index 000000000..9c99cca9a --- /dev/null +++ b/tests/ui/privacy/auxiliary/ctor_aux.rs @@ -0,0 +1,25 @@ +// 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::*; -- cgit v1.2.3