From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../intra-doc/auxiliary/through-proc-macro-aux.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs (limited to 'tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs') 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 +} -- cgit v1.2.3