]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/mixed-site-span.rs
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
[rust.git] / src / test / ui / proc-macro / mixed-site-span.rs
1 // Proc macros using `mixed_site` spans exhibit usual properties of `macro_rules` hygiene.
2
3 // aux-build:mixed-site-span.rs
4
5 #[macro_use]
6 extern crate mixed_site_span;
7
8 struct ItemUse;
9
10 fn main() {
11     'label_use: loop {
12         let local_use = 1;
13         proc_macro_rules!();
14         //~^ ERROR use of undeclared label `'label_use`
15         //~| ERROR cannot find value `local_use` in this scope
16         ItemDef; // OK
17         local_def; //~ ERROR cannot find value `local_def` in this scope
18     }
19 }
20
21 macro_rules! pass_dollar_crate {
22     () => (proc_macro_rules!($crate);) //~ ERROR cannot find type `ItemUse` in crate `$crate`
23 }
24 pass_dollar_crate!();