rust/tests/ui/drop/norm-ice-106444.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
269 B
Rust
Raw Permalink Normal View History

2024-03-23 06:38:50 -05:00
// 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) };
}