diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-23 12:38:50 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-23 12:38:50 +0100 |
| commit | cc422cee97e53195ac75b25d221f192b6a3a200b (patch) | |
| tree | 5d95e4a68a10edf8f3c3ffa83e64fb143b69ae67 | |
| parent | f8aeac8a3692b1a02002a1293c231de73149e676 (diff) | |
| download | rust-cc422cee97e53195ac75b25d221f192b6a3a200b.tar.gz rust-cc422cee97e53195ac75b25d221f192b6a3a200b.zip | |
add test for ICE #106444
Fixes #106444
| -rw-r--r-- | tests/ui/drop/norm-ice-106444.rs | 16 |
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) }; +} |
