diff options
| author | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-26 16:26:03 +0200 |
|---|---|---|
| committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-26 17:35:29 +0200 |
| commit | bda718fd255237167f08198b0fc80ab0d484d58e (patch) | |
| tree | 5ee31cfdf717cb0189c12b1eb9e49ac600920430 /src/test/codegen/function-arguments.rs | |
| parent | 184156ed97a0a1256e80a17b8673749569407c94 (diff) | |
| download | rust-bda718fd255237167f08198b0fc80ab0d484d58e.tar.gz rust-bda718fd255237167f08198b0fc80ab0d484d58e.zip | |
Allow niche-filling dataful variants to be represented as a ScalarPair
Diffstat (limited to 'src/test/codegen/function-arguments.rs')
| -rw-r--r-- | src/test/codegen/function-arguments.rs | 6 |
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] { |
