about summary refs log tree commit diff
path: root/tests/ui/drop/issue-17718-const-destructors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/drop/issue-17718-const-destructors.rs')
-rw-r--r--tests/ui/drop/issue-17718-const-destructors.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/drop/issue-17718-const-destructors.rs b/tests/ui/drop/issue-17718-const-destructors.rs
new file mode 100644
index 00000000000..c9a729c7b20
--- /dev/null
+++ b/tests/ui/drop/issue-17718-const-destructors.rs
@@ -0,0 +1,10 @@
+// check-pass
+#![allow(dead_code)]
+struct A;
+impl Drop for A {
+    fn drop(&mut self) {}
+}
+
+const FOO: A = A;
+
+fn main() {}