Skip to content

Commit cc422ce

Browse files
committed
add test for ICE #106444
Fixes #106444
1 parent f8aeac8 commit cc422ce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// issue: rust-lang/rust#106444
2+
// ICE failed to normalize
3+
//@ compile-flags: -Zmir-opt-level=3
4+
//@ check-pass
5+
6+
#![crate_type="lib"]
7+
8+
pub trait A {
9+
type B;
10+
}
11+
12+
pub struct S<T: A>(T::B);
13+
14+
pub fn foo<T: A>(p: *mut S<T>) {
15+
unsafe { core::ptr::drop_in_place(p) };
16+
}

0 commit comments

Comments
 (0)