]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/redirect.rs
Rollup merge of #107598 - chenyukang:yukang/fix-core-bench, r=thomcc
[rust.git] / tests / rustdoc / redirect.rs
1 // aux-build:reexp-stripped.rs
2 // build-aux-docs
3 // ignore-cross-compile
4
5 extern crate reexp_stripped;
6
7 pub trait Foo {}
8
9 // @has redirect/index.html
10 // @has - '//code' 'pub use reexp_stripped::Bar'
11 // @has - '//code/a' 'Bar'
12 // @has - '//a[@href="../reexp_stripped/hidden/struct.Bar.html"]' 'Bar'
13 // @has reexp_stripped/hidden/struct.Bar.html
14 // @has 'reexp_stripped/struct.Bar.html'
15 // @has - '//a[@href="struct.Bar.html"]' 'Bar'
16 #[doc(no_inline)]
17 pub use reexp_stripped::Bar;
18 impl Foo for Bar {}
19
20 // @has redirect/index.html
21 // @has - '//code' 'pub use reexp_stripped::Quz'
22 // @has - '//code/a' 'Quz'
23 // @has reexp_stripped/private/struct.Quz.html
24 // @has - '//p/a' '../../reexp_stripped/struct.Quz.html'
25 // @has 'reexp_stripped/struct.Quz.html'
26 #[doc(no_inline)]
27 pub use reexp_stripped::Quz;
28 impl Foo for Quz {}
29
30 mod private_no_inline {
31     pub struct Qux;
32     impl ::Foo for Qux {}
33 }
34
35 // @has redirect/index.html
36 // @has - '//code' 'pub use private_no_inline::Qux'
37 // @!has - '//a' 'Qux'
38 // @!has redirect/struct.Qux.html
39 #[doc(no_inline)]
40 pub use private_no_inline::Qux;