about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-24 16:02:47 +0800
committerkennytm <kennytm@gmail.com>2018-05-24 17:34:55 +0800
commit98606cfe126b1ac7b68e25814c3e20c6b0b3b17c (patch)
tree009bf1f3c8262b10eb34b91615ee3a53f26cc256 /src/test/rustdoc
parent99de8ab38b282b83553a10e5dd0e83976ee33af0 (diff)
parent4cf0c5fa329011b5e8059185d00dc069616c8979 (diff)
downloadrust-98606cfe126b1ac7b68e25814c3e20c6b0b3b17c.tar.gz
rust-98606cfe126b1ac7b68e25814c3e20c6b0b3b17c.zip
Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27
 rustdoc: hide macro export statements from docs

As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.

What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/pub-use-extern-macros.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/rustdoc/pub-use-extern-macros.rs b/src/test/rustdoc/pub-use-extern-macros.rs
index 57d54585d84..a6e707cc2ad 100644
--- a/src/test/rustdoc/pub-use-extern-macros.rs
+++ b/src/test/rustdoc/pub-use-extern-macros.rs
@@ -15,14 +15,15 @@
 extern crate macros;
 
 // @has pub_use_extern_macros/macro.bar.html
+// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
 pub use macros::bar;
 
 // @has pub_use_extern_macros/macro.baz.html
-// @!has pub_use_extern_macros/index.html 'pub use macros::baz;'
+// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
 #[doc(inline)]
 pub use macros::baz;
 
 // @has pub_use_extern_macros/macro.quux.html
-// @!has pub_use_extern_macros/index.html 'pub use macros::quux;'
+// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
 #[doc(hidden)]
 pub use macros::quux;