diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-01-20 20:57:13 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-02-23 11:13:35 +0100 |
| commit | 2b59e7667de6f63391d9cc390c6e9cd3559380e1 (patch) | |
| tree | a56141415441f875f5d4f41fddab93e9011c72af | |
| parent | 3a92f771b22a2ac487838767f552c4dae0a52ddc (diff) | |
| download | rust-2b59e7667de6f63391d9cc390c6e9cd3559380e1.tar.gz rust-2b59e7667de6f63391d9cc390c6e9cd3559380e1.zip | |
Add tests for --generate-redirect-map option
| -rw-r--r-- | src/test/rustdoc/redirect-map-empty.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc/redirect-map.rs | 23 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/rustdoc/redirect-map-empty.rs b/src/test/rustdoc/redirect-map-empty.rs new file mode 100644 index 00000000000..e9d021e0fa8 --- /dev/null +++ b/src/test/rustdoc/redirect-map-empty.rs @@ -0,0 +1,6 @@ +// compile-flags: -Z unstable-options --generate-redirect-map + +#![crate_name = "foo"] + +// @!has foo/redirect-map.json +pub struct Foo; diff --git a/src/test/rustdoc/redirect-map.rs b/src/test/rustdoc/redirect-map.rs new file mode 100644 index 00000000000..b7f16b64e38 --- /dev/null +++ b/src/test/rustdoc/redirect-map.rs @@ -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 { + () => {} +} |
