]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/dollar-crate.rs
Rollup merge of #106816 - TimNN:rental-remap, r=oli-obj
[rust.git] / tests / ui / proc-macro / dollar-crate.rs
1 // check-pass
2 // edition:2018
3 // compile-flags: -Z span-debug
4 // aux-build:test-macros.rs
5 // aux-build:dollar-crate-external.rs
6
7 #![no_std] // Don't load unnecessary hygiene information from std
8 extern crate std;
9
10 #[macro_use]
11 extern crate test_macros;
12 extern crate dollar_crate_external;
13
14 type S = u8;
15
16 mod local {
17     macro_rules! local {
18         () => {
19             print_bang! {
20                 struct M($crate::S);
21             }
22
23             #[print_attr]
24             struct A($crate::S);
25
26             #[derive(Print)]
27             struct D($crate::S);
28         };
29     }
30
31     local!();
32 }
33
34 mod external {
35     use crate::dollar_crate_external;
36
37     dollar_crate_external::external!();
38 }
39
40 fn main() {}