1 // @has 'glob_shadowing/index.html'
2 // @count - '//div[@class="item-left module-item"]' 6
3 // @!has - '//div[@class="item-right docblock-short"]' 'sub1::describe'
4 // @has - '//div[@class="item-right docblock-short"]' 'sub2::describe'
6 // @!has - '//div[@class="item-right docblock-short"]' 'sub1::describe2'
8 // @!has - '//div[@class="item-right docblock-short"]' 'sub1::prelude'
9 // @has - '//div[@class="item-right docblock-short"]' 'mod::prelude'
11 // @has - '//div[@class="item-right docblock-short"]' 'sub1::Foo (struct)'
12 // @has - '//div[@class="item-right docblock-short"]' 'mod::Foo (function)'
14 // @has - '//div[@class="item-right docblock-short"]' 'sub4::inner::X'
16 // @has 'glob_shadowing/fn.describe.html'
17 // @has - '//div[@class="docblock"]' 'sub2::describe'
20 // this should be shadowed by sub2::describe
22 pub fn describe() -> &'static str {
26 // this should be shadowed by mod::prelude
31 // this should *not* be shadowed, because sub1::Foo and mod::Foo are in different namespaces
32 /// sub1::Foo (struct)
35 // this should be shadowed,
36 // because both sub1::describe2 and sub3::describe2 are from glob reexport
38 pub fn describe2() -> &'static str {
45 pub fn describe() -> &'static str {
51 // this should be shadowed
52 // because both sub1::describe2 and sub3::describe2 are from glob reexport
54 pub fn describe2() -> &'static str {
60 // this should be shadowed by sub4::inner::X
62 pub const X: usize = 0;
66 pub const X: usize = 1;
70 /// mod::Foo (function)
74 pub use sub2::describe;
83 pub use sub4::inner::*;