add test for ICE #106444

Fixes #106444
This commit is contained in:
Matthias Krüger 2024-03-23 12:38:50 +01:00
parent f8aeac8a36
commit cc422cee97

View File

@ -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) };
}