-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Regression of #63210 param attributes not showing in proc-macro TokenStream #64282
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
So I investigated the issue and I don't believe there's a bug here. The macro prints out the following:
If you look closely, you will see that before the line with If you slightly change the macro into... extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn rename_params(args: TokenStream, _: TokenStream) -> TokenStream {
dbg!(&args);
TokenStream::new()
} ...you will see it more clearly:
This seems to be in order. |
That isn't the problem.
|
Mm, in the absolutely most recent nightly, it seems to be working now! :D |
Odd; I tried this out on nightly-2019-08-05 and it seems to be including |
Yup, I was doing something wrong somewhere. 🤷♂ Just happy it's working now so I can do the cool things :D |
It seems #63210 isn't actually fixed.
Run
cargo test -- --nocapture
and you'll see theTokenStream
does not contain any attributes on a parameter: https://github.com/bbqsrc/params-attribute-exampleThe text was updated successfully, but these errors were encountered: