summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs')
-rw-r--r--tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs b/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs
new file mode 100644
index 000000000..5c4a01ee3
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs
@@ -0,0 +1,20 @@
+// force-host
+// no-prefer-dynamic
+#![crate_type = "proc-macro"]
+#![crate_name="some_macros"]
+
+extern crate proc_macro;
+use proc_macro::TokenStream;
+
+#[proc_macro_attribute]
+pub fn first(_attr: TokenStream, item: TokenStream) -> TokenStream {
+ item // This doesn't erase the spans.
+}
+
+#[proc_macro_attribute]
+pub fn second(_attr: TokenStream, item: TokenStream) -> TokenStream {
+ // Make a new `TokenStream` to erase the spans:
+ let mut out: TokenStream = TokenStream::new();
+ out.extend(item);
+ out
+}