Open
Description
Hi.
I'm not sure whether it is a bug or not, that may be an hygiene issue.
But, in the following repository, if you run it with cargo build
, you get the following error:
error[E0451]: field `my_field` of struct `MyStruct` is private
--> src/main.rs:12:5
|
12 | pp!(MyStruct);
| ^^^^^^^^^^^^^^ field `my_field` is private
However, that does not make sense, because the field is declared in the same module:
struct MyStruct {
my_field: i32,
}
fn main() {
pp!(MyStruct); // Error: field `my_field` of struct `MyStruct` is private.
}
This only happens when this feature is enabled.
What makes me think this might be an hygiene issue is that I hard-coded the field name here.
So, if it's a bug, please fix this issue.
Thank you.