about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>2020-12-27 19:05:35 +0100
committerDaniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>2021-01-06 15:13:38 +0100
commit28e9c6723a9111b649384ca909eded20c18c76a3 (patch)
treef171953bcdde3c6c81842f1608d9f1203d69735e
parentaa863caebe74710d119662894ecd946fa8bcf725 (diff)
downloadrust-28e9c6723a9111b649384ca909eded20c18c76a3.tar.gz
rust-28e9c6723a9111b649384ca909eded20c18c76a3.zip
Update test assertions (showcases bug)
-rw-r--r--src/test/rustdoc/auxiliary/macro_pub_in_module.rs2
-rw-r--r--src/test/rustdoc/macro_pub_in_module.rs36
2 files changed, 31 insertions, 7 deletions
diff --git a/src/test/rustdoc/auxiliary/macro_pub_in_module.rs b/src/test/rustdoc/auxiliary/macro_pub_in_module.rs
index fa987689ec6..137b1238600 100644
--- a/src/test/rustdoc/auxiliary/macro_pub_in_module.rs
+++ b/src/test/rustdoc/auxiliary/macro_pub_in_module.rs
@@ -8,6 +8,6 @@ pub mod some_module {
     mod private {
         pub macro external_macro() {}
     }
-    // @has external_crate/some_module/macro.external_macro.html
+
     pub use private::external_macro;
 }
diff --git a/src/test/rustdoc/macro_pub_in_module.rs b/src/test/rustdoc/macro_pub_in_module.rs
index 7d92246279f..d488f51cd49 100644
--- a/src/test/rustdoc/macro_pub_in_module.rs
+++ b/src/test/rustdoc/macro_pub_in_module.rs
@@ -1,49 +1,73 @@
 // aux-build:macro_pub_in_module.rs
 // edition:2018
 // build-aux-docs
-// @has external_crate/some_module/macro.external_macro.html
 
 //! See issue #74355
 #![feature(decl_macro, no_core, rustc_attrs)]
 #![crate_name = "krate"]
 #![no_core]
 
+// @has external_crate/some_module/macro.external_macro.html
 extern crate external_crate;
 
 pub mod inner {
     // @has krate/inner/macro.raw_const.html
+    // @!has krate/macro.raw_const.html
     pub macro raw_const() {}
 
     // @has krate/inner/macro.test.html
+    // @!has krate/macro.test.html
     #[rustc_builtin_macro]
     pub macro test($item:item) {}
 
     // @has krate/inner/macro.Clone.html
+    // @!has krate/macro.Clone.html
     #[rustc_builtin_macro]
     pub macro Clone($item:item) {}
 
-    // Make sure the logic is not affected by a re-export.
+    // Make sure the logic is not affected by re-exports.
+    mod unrenamed {
+        // @!has krate/macro.unrenamed.html
+        #[rustc_macro_transparency = "semitransparent"]
+        pub macro unrenamed() {}
+    }
+    // @has krate/inner/macro.unrenamed.html
+    pub use unrenamed::unrenamed;
+
     mod private {
+        // @!has krate/macro.m.html
         pub macro m() {}
     }
     // @has krate/inner/macro.renamed.html
+    // @!has krate/macro.renamed.html
     pub use private::m as renamed;
 
+    mod private2 {
+        // @!has krate/macro.m2.html
+        pub macro m2() {}
+    }
+    use private2 as renamed_mod;
+    // @has krate/inner/macro.m2.html
+    pub use renamed_mod::m2;
+
     // @has krate/inner/macro.external_macro.html
+    // @!has krate/macro.external_macro.html
     pub use ::external_crate::some_module::external_macro;
 }
 
 // Namespaces: Make sure the logic does not mix up a function name with a module name…
 fn both_fn_and_mod() {
-    pub macro m() {}
+    // @!has krate/macro.in_both_fn_and_mod.html
+    pub macro in_both_fn_and_mod() {}
 }
 pub mod both_fn_and_mod {
-    // @!has krate/both_fn_and_mod/macro.m.html
+    // @!has krate/both_fn_and_mod/macro.in_both_fn_and_mod.html
 }
 
 const __: () = {
-    pub macro m() {}
+    // @!has krate/macro.in_both_const_and_mod.html
+    pub macro in_both_const_and_mod() {}
 };
 pub mod __ {
-    // @!has krate/__/macro.m.html
+    // @!has krate/__/macro.in_both_const_and_mod.html
 }