about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-23 12:38:50 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2024-03-23 12:38:50 +0100
commitcc422cee97e53195ac75b25d221f192b6a3a200b (patch)
tree5d95e4a68a10edf8f3c3ffa83e64fb143b69ae67
parentf8aeac8a3692b1a02002a1293c231de73149e676 (diff)
downloadrust-cc422cee97e53195ac75b25d221f192b6a3a200b.tar.gz
rust-cc422cee97e53195ac75b25d221f192b6a3a200b.zip
add test for ICE #106444
Fixes #106444
-rw-r--r--tests/ui/drop/norm-ice-106444.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/drop/norm-ice-106444.rs b/tests/ui/drop/norm-ice-106444.rs
new file mode 100644
index 00000000000..b248bc73bbe
--- /dev/null
+++ b/tests/ui/drop/norm-ice-106444.rs
@@ -0,0 +1,16 @@
+// issue: rust-lang/rust#106444
+// ICE failed to normalize
+//@ compile-flags: -Zmir-opt-level=3
+//@ check-pass
+
+#![crate_type="lib"]
+
+pub trait A {
+    type B;
+}
+
+pub struct S<T: A>(T::B);
+
+pub fn foo<T: A>(p: *mut S<T>) {
+    unsafe { core::ptr::drop_in_place(p) };
+}