Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8d8c0bf

Browse files
committed
useless_attribute: allow clippy::disallowed_types
Closes rust-lang/rust-clippy#12753
1 parent 20b085d commit 8d8c0bf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

clippy_lints/src/attrs/useless_attribute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
3535
| "unsafe_removed_from_name"
3636
| "module_name_repetitions"
3737
| "single_component_path_imports"
38+
| "disallowed_types"
3839
)
3940
})
4041
{

tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ fn main() {
4040
let _ = HashMap;
4141
let _: usize = 64_usize;
4242
}
43+
44+
mod useless_attribute {
45+
// Regression test for https://github.com/rust-lang/rust-clippy/issues/12753
46+
#[allow(clippy::disallowed_types)]
47+
use std::collections::HashMap;
48+
}

0 commit comments

Comments
 (0)