diff options
| author | Rebecca Turner <rbt@sent.as> | 2024-05-02 11:55:11 -0700 |
|---|---|---|
| committer | Rebecca Turner <rbt@sent.as> | 2024-05-02 11:55:11 -0700 |
| commit | 8d8c0bfb0e2d50ca2a7a4fbbd10cb2e62a319539 (patch) | |
| tree | ef21a8a6bd408747055dd4e3565ea67f208da38a | |
| parent | 20b085d500dfba5afe0869707bf357af3afe20be (diff) | |
| download | rust-8d8c0bfb0e2d50ca2a7a4fbbd10cb2e62a319539.tar.gz rust-8d8c0bfb0e2d50ca2a7a4fbbd10cb2e62a319539.zip | |
useless_attribute: allow clippy::disallowed_types
Closes https://github.com/rust-lang/rust-clippy/issues/12753
| -rw-r--r-- | clippy_lints/src/attrs/useless_attribute.rs | 1 | ||||
| -rw-r--r-- | tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/clippy_lints/src/attrs/useless_attribute.rs b/clippy_lints/src/attrs/useless_attribute.rs index 7575f502a7c..7515ee9bbc8 100644 --- a/clippy_lints/src/attrs/useless_attribute.rs +++ b/clippy_lints/src/attrs/useless_attribute.rs @@ -35,6 +35,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute]) | "unsafe_removed_from_name" | "module_name_repetitions" | "single_component_path_imports" + | "disallowed_types" ) }) { diff --git a/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs b/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs index 7f28efd676f..f02bd07cfe7 100644 --- a/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs +++ b/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs @@ -40,3 +40,9 @@ fn main() { let _ = HashMap; let _: usize = 64_usize; } + +mod useless_attribute { + // Regression test for https://github.com/rust-lang/rust-clippy/issues/12753 + #[allow(clippy::disallowed_types)] + use std::collections::HashMap; +} |
