Skip to content

Commit c845a53

Browse files
Add regression test for rust-lang#105735
1 parent 6fb4ce9 commit c845a53

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Regression test to ensure that both `AtomicU8` items are displayed but not the re-export.
2+
3+
#![crate_name = "foo"]
4+
#![no_std]
5+
6+
// @has 'foo/index.html'
7+
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
8+
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
9+
// We also ensure we don't have another item displayed.
10+
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
11+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Definitions'
12+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
13+
14+
mod other {
15+
pub type AtomicU8 = ();
16+
}
17+
18+
mod thing {
19+
pub use crate::other::AtomicU8;
20+
21+
#[allow(non_upper_case_globals)]
22+
pub const AtomicU8: () = ();
23+
}
24+
25+
pub use crate::thing::AtomicU8;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Regression test to ensure that both `AtomicU8` items are displayed but not the re-export.
2+
3+
#![crate_name = "foo"]
4+
#![no_std]
5+
6+
// @has 'foo/index.html'
7+
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'AtomicU8'
8+
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
9+
// We also ensure we don't have another item displayed.
10+
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
11+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
12+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
13+
14+
mod thing {
15+
pub use core::sync::atomic::AtomicU8;
16+
17+
#[allow(non_upper_case_globals)]
18+
pub const AtomicU8: () = ();
19+
}
20+
21+
pub use crate::thing::AtomicU8;

0 commit comments

Comments
 (0)