]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/multiple-import-levels.rs
Rollup merge of #106835 - compiler-errors:new-solver-gat-rebase-oops, r=lcnr
[rust.git] / tests / rustdoc / multiple-import-levels.rs
1 // The goal of this test is to ensure that the attributes of all imports are taken into
2 // account.
3
4 #![crate_name = "foo"]
5
6 mod a {
7     /// 1
8     pub struct Type;
9 }
10
11 mod b {
12     /// 2
13     pub use crate::a::Type;
14 }
15
16 mod c {
17     /// 3
18     pub use crate::b::Type;
19     /// 4
20     pub use crate::b::Type as Woof;
21 }
22
23 // @has 'foo/struct.Type.html'
24 // @has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'foo 2 1'
25 /// foo
26 pub use b::Type;
27 // @has 'foo/struct.Whatever.html'
28 // @has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'whatever 3 2 1'
29 /// whatever
30 pub use c::Type as Whatever;
31 // @has 'foo/struct.Woof.html'
32 // @has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'a dog 4 2 1'
33 /// a dog
34 pub use c::Woof;