Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 1e15278

Browse files
committed
Sketchy modification for $crate
1 parent edad180 commit 1e15278

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

impl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn hack_expr(input: TokenStream) -> TokenStream {
2222
Input = (stringify!($($tt)*), 0).1
2323
}}
2424
25-
proc_macro_call!()
25+
proc_macro_call!($crate)
2626
}}}}
2727
}}
2828
", attrs=hack.attrs, name=hack.name, name_impl=hack.name_impl);

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ macro_rules! proc_macro_expr_impl {
304304

305305
format!("
306306
macro_rules! proc_macro_call {{
307-
() => {{
307+
($proc_macro_hack_crate:tt) => {{
308308
{}
309309
}}
310310
}}
311-
", func(tokens)).parse().unwrap()
311+
", func(tokens).replace("$crate", "$proc_macro_hack_crate")).parse().unwrap()
312312
}
313313
)+
314314
};

0 commit comments

Comments
 (0)