mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
ea9e442222
This matches the name used by the Rust Reference [1], which is also what people usually call these items. [1]: https://doc.rust-lang.org/reference/items/type-aliases.html
26 lines
778 B
Rust
26 lines
778 B
Rust
// 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="small-section-header"]' 2
|
|
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
|
|
// @has - '//*[@id="main-content"]/*[@class="small-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;
|