blob: 39ad8368a5007f5b09e8271871bc7cfe1cfb8f8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Testing token span hygiene.
//@ proc-macro: mixed-site-span.rs
extern crate mixed_site_span;
use mixed_site_span::declare_macro;
pub struct TokenItem;
#[macro_export]
macro_rules! invoke_with_crate {
($s:ident $i:ident) => { with_crate!{$crate $s $i} };
}
#[macro_export]
macro_rules! invoke_with_ident {
($s:ident $i:ident) => { with_crate!{krate $s $i} };
($m:ident $s:ident $i:ident) => { with_crate!{$m $s $i} };
}
macro_rules! local {() => {
declare_macro!{$crate input use_input_crate}
declare_macro!{$crate mixed use_mixed_crate}
declare_macro!{$crate call use_call_crate}
}}
local!{}
declare_macro!{krate input use_input_krate}
declare_macro!{krate mixed use_mixed_krate}
declare_macro!{krate call use_call_krate}
|