add regression test

This commit is contained in:
Esteban Küber 2019-08-26 21:12:59 -07:00
parent b2b9b81c9a
commit 7ed542da78
2 changed files with 32 additions and 0 deletions

View file

@ -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
}

View file

@ -0,0 +1,12 @@
// aux-build:through-proc-macro-aux.rs
// build-aux-docs
#![warn(intra_doc_link_resolution_failure)]
extern crate some_macros;
#[some_macros::second]
pub enum Boom {
/// [Oooops]
Bam,
}
fn main() {}