File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 ( ) { }
You can’t perform that action at this time.
0 commit comments