Skip to content

Commit 7ed542d

Browse files
committed
add regression test
1 parent b2b9b81 commit 7ed542d

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// force-host
2+
// no-prefer-dynamic
3+
#![crate_type = "proc-macro"]
4+
#![crate_name="some_macros"]
5+
6+
extern crate proc_macro;
7+
use proc_macro::TokenStream;
8+
9+
#[proc_macro_attribute]
10+
pub fn first(_attr: TokenStream, item: TokenStream) -> TokenStream {
11+
item // This doesn't erase the spans.
12+
}
13+
14+
#[proc_macro_attribute]
15+
pub fn second(_attr: TokenStream, item: TokenStream) -> TokenStream {
16+
// Make a new `TokenStream` to erase the spans:
17+
let mut out: TokenStream = TokenStream::new();
18+
out.extend(item);
19+
out
20+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// aux-build:through-proc-macro-aux.rs
2+
// build-aux-docs
3+
#![warn(intra_doc_link_resolution_failure)]
4+
extern crate some_macros;
5+
6+
#[some_macros::second]
7+
pub enum Boom {
8+
/// [Oooops]
9+
Bam,
10+
}
11+
12+
fn main() {}

0 commit comments

Comments
 (0)