RS.CLIPPY.DUPLICATED_ATTRIBUTES

Duplicated attribute

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: duplicated_attributes. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for attributes that appear two or more times.

Why is this bad?

Repeating an attribute on the same item (or globally on the same crate) is unnecessary and doesn't have an effect.

Example

#[allow(dead_code)]
#[allow(dead_code)]
fn foo() {}

Use instead:

#[allow(dead_code)]
fn foo() {}