about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2024-11-30 22:27:20 +0100
committerSamuel Tardieu <sam@rfc1149.net>2024-11-30 22:54:24 +0100
commit092bfefa49ca113e5e82d33879593fde8fa91830 (patch)
tree446cf31735893d34b78504c00648f506cff2ac35 /tests
parent736d1145d754a23be0c6489375a782adad452c7f (diff)
Do not mark attributes with unknown namespace as useless
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/useless_attribute.fixed9
-rw-r--r--tests/ui/useless_attribute.rs9
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/useless_attribute.fixed b/tests/ui/useless_attribute.fixed
index 231fc0a892a..de1062f123b 100644
--- a/tests/ui/useless_attribute.fixed
+++ b/tests/ui/useless_attribute.fixed
@@ -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;
+}
diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs
index 8dfcd2110a4..94657dd1ca3 100644
--- a/tests/ui/useless_attribute.rs
+++ b/tests/ui/useless_attribute.rs
@@ -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;
+}