Open matthiaskrgr opened 6 years ago
Confirming I can reproduce with rustfmt 1.5.1-nightly (b22884f7 2022-07-19)
input
#![cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always,))]
#![allow(nline_always,)]
output
#![cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always,))]
#![allow(nline_always)]
I understand that this isn't the intended result from this issue, but we don't want to remove trailing commas if they are present in the source text. The current behavior in the #![allow(nline_always,)]
case is a bug. I just checked and #5394 resolves removing the trailing comma in the #![allow(nline_always,)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always,)]
could be formatted to#![cfg_attr(feature = "cargo-clippy", allow(clippy::inline_always)]
.Note that this already works for just
#![allow(nline_always,)]
rustfmt 1.0.0-nightly (43206f4 2018-11-30)