You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my_mod is a module with body in file my_mod.rs. To include it in the project it must be declared in another file, let's say lib.rs. I'm trying to push whole my_mod into proc macro my_macro, so I write in lib.rs:
#[my_macro]
mod my_mod;
Without "nightly" feature
Whole content of my_mod is passed into macro.
With "nightly" feature
Only mod my_mod; is passed into macro.
Question
Is it regression or is it the way proc macros 2.0 are supposed to work?
The text was updated successfully, but these errors were encountered:
This sounds like a rustc issue - I'm not sure. It's surprising that the to_string method would produce such a dramatically different result than the TokenStream.
Situation
my_mod
is a module with body in filemy_mod.rs
. To include it in the project it must be declared in another file, let's saylib.rs
. I'm trying to push wholemy_mod
into proc macromy_macro
, so I write inlib.rs
:Without "nightly" feature
Whole content of
my_mod
is passed into macro.With "nightly" feature
Only
mod my_mod;
is passed into macro.Question
Is it regression or is it the way proc macros 2.0 are supposed to work?
The text was updated successfully, but these errors were encountered: