about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-28 08:01:22 +0000
committerbors <bors@rust-lang.org>2018-03-28 08:01:22 +0000
commitbcffdf1b6da161eecd761eb4a3ef703ff05c33f6 (patch)
tree73aeb763d2f28fa243ddba8777ef616941231714 /src/test/codegen
parente58df0d8c5221fa5743587740eb50e4db42c3d1e (diff)
parentbda718fd255237167f08198b0fc80ab0d484d58e (diff)
downloadrust-bcffdf1b6da161eecd761eb4a3ef703ff05c33f6.tar.gz
rust-bcffdf1b6da161eecd761eb4a3ef703ff05c33f6.zip
Auto merge of #49383 - nox:scalarpair, r=eddyb
Allow niche-filling dataful variants to be represented as a ScalarPair

r? @eddyb
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/function-arguments.rs6
1 files changed, 6 insertions, 0 deletions
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<Drop>) {
 }
 
+// CHECK: { i8*, i8* } @trait_option(i8* noalias %x.0, i8* %x.1)
+#[no_mangle]
+pub fn trait_option(x: Option<Box<Drop>>) -> Option<Box<Drop>> {
+  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] {