Don't ICE in might_permit_raw_init if reference is polymorphic

This commit is contained in:
Michael Goulet 2023-02-13 21:07:46 +00:00
parent 0b439b119b
commit 087a0136d0
4 changed files with 50 additions and 2 deletions

View file

@ -0,0 +1,8 @@
// compile-flags: --crate-type=lib -Zmir-enable-passes=+InstCombine
// build-pass
#![feature(core_intrinsics)]
pub fn generic<T>() {
core::intrinsics::assert_mem_uninitialized_valid::<&T>();
}