]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/inline_cross/use_crate.rs
Rollup merge of #107519 - joboet:raw_os_error_ty, r=Amanieu
[rust.git] / tests / rustdoc / inline_cross / use_crate.rs
1 // aux-build:use_crate.rs
2 // aux-build:use_crate_2.rs
3 // build-aux-docs
4 // edition:2018
5 // compile-flags:--extern use_crate --extern use_crate_2
6
7 // During the buildup to Rust 2018, rustdoc would eagerly inline `pub use some_crate;` as if it
8 // were a module, so we changed it to make `pub use`ing crate roots remain as a `pub use` statement
9 // in docs... unless you added `#[doc(inline)]`.
10
11 #![crate_name = "local"]
12
13 // @!has-dir local/use_crate
14 // @has local/index.html
15 // @has - '//code' 'pub use use_crate'
16 pub use use_crate;
17
18 // @has-dir local/asdf
19 // @has local/asdf/index.html
20 // @has local/index.html '//a/@href' 'asdf/index.html'
21 pub use use_crate::asdf;
22
23 // @has-dir local/use_crate_2
24 // @has local/use_crate_2/index.html
25 // @has local/index.html '//a/@href' 'use_crate_2/index.html'
26 #[doc(inline)]
27 pub use use_crate_2;