about summary refs log tree commit diff
path: root/tests/ui/suggestions/auxiliary/hidden-struct.rs
blob: 1f495a9f2224a7ff0bac17b2eede08affaae4c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// `Foo` and `Bar` should not be suggested in diagnostics of dependents

#[doc(hidden)]
pub mod hidden {
    pub struct Foo;
}

pub mod hidden1 {
    #[doc(hidden)]
    pub struct Bar;
}

// `Baz` and `Quux` *should* be suggested in diagnostics of dependents

#[doc(hidden)]
pub mod hidden2 {
    pub struct Baz;
}

pub use hidden2::Baz;

#[doc(hidden)]
pub(crate) mod hidden3 {
    pub struct Quux;
}

pub use hidden3::Quux;

pub trait Marker {}

impl Marker for Option<u32> {}
impl Marker for hidden::Foo {}
impl Marker for hidden1::Bar {}
impl Marker for Baz {}
impl Marker for Quux {}