Skip to content

Commit 2b59e76

Browse files
Add tests for --generate-redirect-map option
1 parent 3a92f77 commit 2b59e76

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// compile-flags: -Z unstable-options --generate-redirect-map
2+
3+
#![crate_name = "foo"]
4+
5+
// @!has foo/redirect-map.json
6+
pub struct Foo;

src/test/rustdoc/redirect-map.rs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// compile-flags: -Z unstable-options --generate-redirect-map
2+
3+
#![crate_name = "foo"]
4+
5+
// @!has foo/private/struct.Quz.html
6+
// @!has foo/hidden/struct.Bar.html
7+
// @has foo/redirect-map.json
8+
pub use private::Quz;
9+
pub use hidden::Bar;
10+
11+
mod private {
12+
pub struct Quz;
13+
}
14+
15+
#[doc(hidden)]
16+
pub mod hidden {
17+
pub struct Bar;
18+
}
19+
20+
#[macro_export]
21+
macro_rules! foo {
22+
() => {}
23+
}

0 commit comments

Comments
 (0)