Do not mark attributes with unknown namespace as useless

This commit is contained in:
Samuel Tardieu 2024-11-30 22:27:20 +01:00
parent 736d1145d7
commit 092bfefa49
3 changed files with 30 additions and 10 deletions

View file

@ -134,3 +134,12 @@ pub mod ambiguous_glob_exports {
pub use my_prelude::*;
pub use my_type::*;
}
// Regression test for https://github.com/rust-lang/rust-clippy/issues/13764
pub mod unknown_namespace {
pub mod some_module {
pub struct SomeType;
}
#[allow(rustc::non_glob_import_of_type_ir_inherent)]
use some_module::SomeType;
}

View file

@ -134,3 +134,12 @@ pub mod ambiguous_glob_exports {
pub use my_prelude::*;
pub use my_type::*;
}
// Regression test for https://github.com/rust-lang/rust-clippy/issues/13764
pub mod unknown_namespace {
pub mod some_module {
pub struct SomeType;
}
#[allow(rustc::non_glob_import_of_type_ir_inherent)]
use some_module::SomeType;
}