about summary refs log tree commit diff
path: root/tests/ui/drop/static-variable-with-drop-trait-9243.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-10 15:43:52 -0400
committerGitHub <noreply@github.com>2025-08-10 15:43:52 -0400
commit5bd4e832d3608a4b06e3bc0b0bf348e664e961ec (patch)
tree7c1d1b40c6f63cb455a916c690f9f1d7cb8a27b1 /tests/ui/drop/static-variable-with-drop-trait-9243.rs
parent18eeac04fc5c2a4c4a8020dbdf1c652077ad0e4e (diff)
parentaa543963c68061d9ca46037071d66a028626ff3f (diff)
downloadrust-5bd4e832d3608a4b06e3bc0b0bf348e664e961ec.tar.gz
rust-5bd4e832d3608a4b06e3bc0b0bf348e664e961ec.zip
Rollup merge of #144553 - Oneirical:uncountable-integer-4, r=jieyouxu
Rehome 32 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang/rust#143902 divided into smaller, easier to review chunks.

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
Diffstat (limited to 'tests/ui/drop/static-variable-with-drop-trait-9243.rs')
-rw-r--r--tests/ui/drop/static-variable-with-drop-trait-9243.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/drop/static-variable-with-drop-trait-9243.rs b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
new file mode 100644
index 00000000000..0ae32c983e9
--- /dev/null
+++ b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
@@ -0,0 +1,17 @@
+// https://github.com/rust-lang/rust/issues/9243
+//@ build-pass
+#![allow(dead_code)]
+// Regression test for issue 9243
+#![allow(non_upper_case_globals)]
+
+pub struct Test {
+    mem: isize,
+}
+
+pub static g_test: Test = Test {mem: 0};
+
+impl Drop for Test {
+    fn drop(&mut self) {}
+}
+
+fn main() {}