mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
useless_attribute: allow dead_code
Closes https://github.com/rust-lang/rust-clippy/issues/4467
This commit is contained in:
parent
17d2ab8f62
commit
e9761bdc01
3 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
|
||||||
|| is_word(lint, sym!(unused))
|
|| is_word(lint, sym!(unused))
|
||||||
|| is_word(lint, sym!(unused_import_braces))
|
|| is_word(lint, sym!(unused_import_braces))
|
||||||
|| is_word(lint, sym!(unused_braces))
|
|| is_word(lint, sym!(unused_braces))
|
||||||
|
|| is_word(lint, sym!(dead_code))
|
||||||
|| extract_clippy_lint(lint).map_or(false, |s| {
|
|| extract_clippy_lint(lint).map_or(false, |s| {
|
||||||
matches!(
|
matches!(
|
||||||
s.as_str(),
|
s.as_str(),
|
||||||
|
|
|
@ -92,3 +92,7 @@ use module::{Struct};
|
||||||
fn main() {
|
fn main() {
|
||||||
test_indented_attr();
|
test_indented_attr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Regression test for https://github.com/rust-lang/rust-clippy/issues/4467
|
||||||
|
#[allow(dead_code)]
|
||||||
|
use std::collections as puppy_doggy;
|
||||||
|
|
|
@ -92,3 +92,7 @@ use module::{Struct};
|
||||||
fn main() {
|
fn main() {
|
||||||
test_indented_attr();
|
test_indented_attr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Regression test for https://github.com/rust-lang/rust-clippy/issues/4467
|
||||||
|
#[allow(dead_code)]
|
||||||
|
use std::collections as puppy_doggy;
|
||||||
|
|
Loading…
Reference in a new issue