From bda718fd255237167f08198b0fc80ab0d484d58e Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 26 Mar 2018 16:26:03 +0200 Subject: Allow niche-filling dataful variants to be represented as a ScalarPair --- src/test/codegen/function-arguments.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test/codegen') diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index 0e98d3f9050..de302c69056 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -133,6 +133,12 @@ pub fn trait_borrow(_: &Drop) { pub fn trait_box(_: Box) { } +// CHECK: { i8*, i8* } @trait_option(i8* noalias %x.0, i8* %x.1) +#[no_mangle] +pub fn trait_option(x: Option>) -> Option> { + x +} + // CHECK: { [0 x i16]*, [[USIZE]] } @return_slice([0 x i16]* noalias nonnull readonly %x.0, [[USIZE]] %x.1) #[no_mangle] pub fn return_slice(x: &[u16]) -> &[u16] { -- cgit 1.4.1-3-g733a5