test that MaybeUninit<bool> is not noundef

This commit is contained in:
Erik Desjardins 2022-02-06 21:09:21 -05:00
parent 8cb0b6ca5b
commit ced947fc12

View File

@ -3,6 +3,8 @@
#![crate_type = "lib"]
#![feature(rustc_attrs)]
use std::mem::MaybeUninit;
pub struct S {
_field: [i32; 8],
}
@ -17,6 +19,12 @@ pub fn boolean(x: bool) -> bool {
x
}
// CHECK: i8 @maybeuninit_boolean(i8 %x)
#[no_mangle]
pub fn maybeuninit_boolean(x: MaybeUninit<bool>) -> MaybeUninit<bool> {
x
}
// CHECK: @readonly_borrow(i32* noalias readonly align 4 dereferenceable(4) %_1)
// FIXME #25759 This should also have `nocapture`
#[no_mangle]