summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
blob: 2905e7d44bcd3858629c2b9814c2bd15d325a689 (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
// Regression test to ensure that both `AtomicU8` items are displayed but not the re-export.

#![crate_name = "foo"]
#![no_std]

// @has 'foo/index.html'
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
// We also ensure we don't have another item displayed.
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'

mod other {
    pub type AtomicU8 = ();
}

mod thing {
    pub use crate::other::AtomicU8;

    #[allow(non_upper_case_globals)]
    pub const AtomicU8: () = ();
}

pub use crate::thing::AtomicU8;