From ced947fc124197bf87e2bdc6741d50db92d296a8 Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Sun, 6 Feb 2022 21:09:21 -0500 Subject: test that MaybeUninit is not noundef --- src/test/codegen/function-arguments.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test/codegen/function-arguments.rs') diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index 998f3890900..1ada49d5d0a 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -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) -> MaybeUninit { + x +} + // CHECK: @readonly_borrow(i32* noalias readonly align 4 dereferenceable(4) %_1) // FIXME #25759 This should also have `nocapture` #[no_mangle] -- cgit 1.4.1-3-g733a5