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 58
Cannot use stringify! within paste::item! in a #[doc] attribute #29
Comments
I published 0.1.13 with a fix. |
Thanks, that was fast! And your fix works like a charm. 😄 |
It seems like this issue (or at least, a related one) has reared its ugly head again
|
Actually, some more in-depth research tells me that this seems entirely unrelated to that Rust issue/version. I just noticed that the issue goes away if I go back to paste v0.1.14, but is present in all versions from v0.1.15 onwards except in 1.0.3, where it works, but then 1.0.4 breaks it again. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This may be an odd edge case, but I want to have this bit of code within a macro:
It gives this compiler error:
The
$name_str
is passed into this invocation asstringify!($name)
. This works just fine if done outside of apaste::item!
, so there must be something going on in the interaction betweenpaste::item!
,stringify!
and/or#[doc]
.It does not work with
#[doc = stringify!($name)]
either (same exact error), but#[doc = "a regular string"]
works just fine.The text was updated successfully, but these errors were encountered: