Don't ICE in might_permit_raw_init if reference is polymorphic
This commit is contained in:
parent
0b439b119b
commit
087a0136d0
4 changed files with 50 additions and 2 deletions
8
tests/ui/lint/invalid_value-polymorphic.rs
Normal file
8
tests/ui/lint/invalid_value-polymorphic.rs
Normal 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>();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue