-
Notifications
You must be signed in to change notification settings - Fork 974
Closed
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE
Description
Example code:
#![feature(stmt_expr_attributes)]
fn main() {
let some_function_call = || {};
let filter = || {
(
// comment
#[allow(clippy::disallowed_methods)]
some_function_call()
)
};
}Everytime you format it it replicates the attribute and doubles it:
#![feature(stmt_expr_attributes)]
fn main() {
let some_function_call = || {};
let filter = || {
(
// comment
#[allow(clippy::disallowed_methods)]
#[allow(clippy::disallowed_methods)]
some_function_call()
)
};
}Version: rustfmt 1.6.0-nightly (39f42ad9 2023-07-19)
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE