Skip to content

Commit 1dc4a62

Browse files
Add lint to useless_attribute exclude
1 parent 84fa9db commit 1dc4a62

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

clippy_lints/src/attrs/useless_attribute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
5151
| "module_name_repetitions"
5252
| "single_component_path_imports"
5353
| "disallowed_types"
54+
| "anon_trait_imports"
5455
)
5556
}) {
5657
return;

tests/ui/anon_trait_imports.fixed

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ mod allow_lint_mod {
262262
}
263263

264264
mod allow_lint_import {
265-
// False positive for useless_attribute
266-
#[allow(clippy::useless_attribute)]
267265
#[allow(clippy::anon_trait_imports)]
268266
use std::any::Any;
269267

tests/ui/anon_trait_imports.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ mod allow_lint_mod {
262262
}
263263

264264
mod allow_lint_import {
265-
// False positive for useless_attribute
266-
#[allow(clippy::useless_attribute)]
267265
#[allow(clippy::anon_trait_imports)]
268266
use std::any::Any;
269267

0 commit comments

Comments
 (0)