File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,17 @@ mod allow_lint_mod {
261261 }
262262}
263263
264+ mod allow_lint_import {
265+ // False positive for useless_attribute
266+ #[allow(clippy::useless_attribute)]
267+ #[allow(clippy::anon_trait_imports)]
268+ use std::any::Any;
269+
270+ fn foo() {
271+ "foo".type_id();
272+ }
273+ }
274+
264275// Limitation: Suggests `use std::any::Any as _::{self};` which looks weird
265276// fn use_trait_self_good() {
266277// use std::any::Any::{self};
Original file line number Diff line number Diff line change @@ -261,6 +261,17 @@ mod allow_lint_mod {
261261 }
262262}
263263
264+ mod allow_lint_import {
265+ // False positive for useless_attribute
266+ #[ allow( clippy:: useless_attribute) ]
267+ #[ allow( clippy:: anon_trait_imports) ]
268+ use std:: any:: Any ;
269+
270+ fn foo ( ) {
271+ "foo" . type_id ( ) ;
272+ }
273+ }
274+
264275// Limitation: Suggests `use std::any::Any as _::{self};` which looks weird
265276// fn use_trait_self_good() {
266277// use std::any::Any::{self};
You can’t perform that action at this time.
0 commit comments