- Notifications
You must be signed in to change notification settings - Fork 960
Closed
Labels
Description
These relate specifically to pub(crate)
tuple structs. Other vis modifiers are not affected. Only occurs when there is a comment before the first unnamed field.
ASlash
's comment is deletedAStar
gets bonus nonsenseBStar
is likeAStar
but on one line
pub(crate) struct ASlash( // hello i32 ); // output: // pub(crate) struct ASlash(i32); pub(crate) struct AStar( /* hello */ i32 ); // output: // pub(crate) struct AStar( // crate) struct AStar( // /* hello */ // i32, // ); pub(crate) struct BStar(/* hello */ i32); // output: // pub(crate) struct BStar(crate) struct BStar(/* hello */ i32);
Tested on rustfmt 1.4.37-stable (c8dfcfe0 2021-09-06)
Similar to #919, but those structs were empty, but these ones have fields.