Add tests for --generate-redirect-map option
This commit is contained in:
parent
3a92f771b2
commit
2b59e7667d
2 changed files with 29 additions and 0 deletions
6
src/test/rustdoc/redirect-map-empty.rs
Normal file
6
src/test/rustdoc/redirect-map-empty.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// compile-flags: -Z unstable-options --generate-redirect-map
|
||||||
|
|
||||||
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// @!has foo/redirect-map.json
|
||||||
|
pub struct Foo;
|
23
src/test/rustdoc/redirect-map.rs
Normal file
23
src/test/rustdoc/redirect-map.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
// compile-flags: -Z unstable-options --generate-redirect-map
|
||||||
|
|
||||||
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// @!has foo/private/struct.Quz.html
|
||||||
|
// @!has foo/hidden/struct.Bar.html
|
||||||
|
// @has foo/redirect-map.json
|
||||||
|
pub use private::Quz;
|
||||||
|
pub use hidden::Bar;
|
||||||
|
|
||||||
|
mod private {
|
||||||
|
pub struct Quz;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub mod hidden {
|
||||||
|
pub struct Bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! foo {
|
||||||
|
() => {}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue