]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs
normalize stderr
[rust.git] / src / test / ui / proc-macro / auxiliary / gen-macro-rules-hygiene.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7 use proc_macro::*;
8
9 #[proc_macro]
10 pub fn gen_macro_rules(_: TokenStream) -> TokenStream {
11     "
12     macro_rules! generated {() => {
13         struct ItemDef;
14         let local_def = 0;
15
16         ItemUse; // OK
17         local_use; // ERROR
18         break 'label_use; // ERROR
19
20         type DollarCrate = $crate::ItemUse; // OK
21     }}
22     ".parse().unwrap()
23 }