rust/tests/ui/drop/norm-ice-106444.rs
Matthias Krüger cc422cee97 add test for ICE #106444
Fixes #106444
2024-03-23 12:38:50 +01:00

17 lines
269 B
Rust

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