This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 57
paste doesnt seem to like stringify in this context #50
Comments
This looks like a rustc bug. Putting ...
Ident {
ident: "path",
span: #0 bytes(456..460),
},
...
Ident {
ident: "path",
span: #22 bytes(381..386),
},
... where the two It seems like the bug is with #[macro_export]
macro_rules! testhook {
(unsafe fn $real_fn:ident ( $($v:ident : $t:ty),* ) -> $r:ty => $hook_fn:ident { $($body:tt)* }) => {
paste! {
pub unsafe fn $hook_fn ( $($v : $t),* ) -> $r {
println!("{}()", stringify!($real_fn));
$($body)*
}
}
};
} |
Thx for the pointer. The problem also happens for where event is macro in the tracing module. |
Should I create a bug against rustc ? |
sarvi
added a commit
to sarvi/redhook
that referenced
this issue
Sep 3, 2020
$body:block) because of rustc bug refered to in dtolnay/paste#50
Fixed by rust-lang/rust#75800. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This compiles fine
with paste, fails to compile
Errors as below
Changing
stringify!($real_fn)
to"something"
then compiles fineThe text was updated successfully, but these errors were encountered: