about summary refs log tree commit diff
path: root/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/test-allow-dead-extern-static-no-warning.rs')
-rw-r--r--tests/ui/lint/test-allow-dead-extern-static-no-warning.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs
new file mode 100644
index 00000000000..2583e431ec1
--- /dev/null
+++ b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs
@@ -0,0 +1,11 @@
+// run-pass
+// compile-flags: --test
+
+#![deny(dead_code)]
+
+extern "C" {
+    #[allow(dead_code)]
+    static Qt: u64;
+}
+
+fn main() {}