Skip to content

Commit 17d2ab8

Browse files
committed
useless_attribute: allow unused_braces
1 parent 8d8c0bf commit 17d2ab8

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

clippy_lints/src/attrs/useless_attribute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
2525
|| is_word(lint, sym!(unreachable_pub))
2626
|| is_word(lint, sym!(unused))
2727
|| is_word(lint, sym!(unused_import_braces))
28+
|| is_word(lint, sym!(unused_braces))
2829
|| extract_clippy_lint(lint).map_or(false, |s| {
2930
matches!(
3031
s.as_str(),

tests/ui/useless_attribute.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ mod module {
8686

8787
#[rustfmt::skip]
8888
#[allow(unused_import_braces)]
89+
#[allow(unused_braces)]
8990
use module::{Struct};
9091

9192
fn main() {

tests/ui/useless_attribute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ mod module {
8686

8787
#[rustfmt::skip]
8888
#[allow(unused_import_braces)]
89+
#[allow(unused_braces)]
8990
use module::{Struct};
9091

9192
fn main() {

0 commit comments

Comments
 (0)