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
I disagree with this, #[macro_use] is closely related to the crate itself and should be on the same line.
Also, this causes a bit of confusion with examples like:
The reasoning here is that #[macro_use] is just another attribute, Rustfmt doesn't distinguish between kinds of attributes. It seems strange to me to format one way for some attributes and some other way for others.
By the way, #[macro_use] is disappearing in the long run, so the decision here may be moot.
I wouldn't have an objection if rustfmt had an option to single-line #[macro_use], but I don't think it should do so by default. I'd probably feel differently if we didn't plan to get rid of #[macro_use].
I propose closing this. We will keep the line break by default. Rustfmt might support an option for single line, but I don't think we should specify it.
Currently, rustfmt will apply this change:
I disagree with this,
#[macro_use]
is closely related to the crate itself and should be on the same line.Also, this causes a bit of confusion with examples like:
It seems like
#[macro_use]
applies to the whole paragraph, but if it were like this:It would be much more obvious what the
#[macro_use]
actually does.Comments are welcome.
The text was updated successfully, but these errors were encountered: