mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
Addr regression test for #108679
This commit is contained in:
parent
4c2b135fc4
commit
c0c93be7ce
29
tests/rustdoc/issue-108679-reexport-of-reexport.rs
Normal file
29
tests/rustdoc/issue-108679-reexport-of-reexport.rs
Normal file
@ -0,0 +1,29 @@
|
||||
// This test ensures that the `struct.B.html` only exists in `a`:
|
||||
// since `a::B` is public (and inlined too), `self::a::B` doesn't
|
||||
// need to be inlined as well.
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
pub mod a {
|
||||
// @has 'foo/a/index.html'
|
||||
// Should only contain "Structs".
|
||||
// @count - '//*[@id="main-content"]//*[@class="item-table"]' 1
|
||||
// @has - '//*[@id="structs"]' 'Structs'
|
||||
// @has - '//*[@id="main-content"]//a[@href="struct.A.html"]' 'A'
|
||||
// @has - '//*[@id="main-content"]//a[@href="struct.B.html"]' 'B'
|
||||
mod b {
|
||||
pub struct B;
|
||||
}
|
||||
pub use self::b::B;
|
||||
pub struct A;
|
||||
}
|
||||
|
||||
// @has 'foo/index.html'
|
||||
// @!has - '//*[@id="structs"]' 'Structs'
|
||||
// @has - '//*[@id="reexports"]' 'Re-exports'
|
||||
// @has - '//*[@id="modules"]' 'Modules'
|
||||
// @has - '//*[@id="main-content"]//*[@id="reexport.A"]' 'pub use self::a::A;'
|
||||
// @has - '//*[@id="main-content"]//*[@id="reexport.B"]' 'pub use self::a::B;'
|
||||
// Should only contain "Modules" and "Re-exports".
|
||||
// @count - '//*[@id="main-content"]//*[@class="item-table"]' 2
|
||||
pub use self::a::{A, B};
|
Loading…
Reference in New Issue
Block a user