rust/src/test/rustdoc/primitive-reexport.rs
Oliver Middleton bbc2ae7590 rustdoc: Fix re-exporting primitive types
* Generate links to the primitive type docs for re-exports.
* Don't ICE on cross crate primitive type re-exports.
* Make primitive type re-exports show up cross crate.
2020-01-26 21:32:43 +00:00

29 lines
1.1 KiB
Rust

// aux-build: primitive-reexport.rs
// compile-flags:--extern foo --edition 2018
#![crate_name = "bar"]
// @has bar/p/index.html
// @has - '//code' 'pub use bool;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.bool.html"]' 'bool'
// @has - '//code' 'pub use char as my_char;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html"]' 'char'
pub mod p {
pub use foo::bar::*;
}
// @has bar/baz/index.html
// @has - '//code' 'pub use bool;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.bool.html"]' 'bool'
// @has - '//code' 'pub use char as my_char;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html"]' 'char'
pub use foo::bar as baz;
// @has bar/index.html
// @has - '//code' 'pub use str;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.str.html"]' 'str'
// @has - '//code' 'pub use i32 as my_i32;'
// @has - '//code/a[@href="https://doc.rust-lang.org/nightly/std/primitive.i32.html"]' 'i32'
pub use str;
pub use i32 as my_i32;