mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Auto merge of #49383 - nox:scalarpair, r=eddyb
Allow niche-filling dataful variants to be represented as a ScalarPair r? @eddyb
This commit is contained in:
@@ -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] {
|
||||
|
||||
Reference in New Issue
Block a user