Skip to content

Commit b440a7c

Browse files
committed
Added missing test files
1 parent d2d4ca1 commit b440a7c

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

test/empty_string_slice.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pub fn main(){
2+
let slice = "";
3+
std::hint::black_box(slice);
4+
}

test/fn_ptr.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#[allow(improper_ctypes_definitions)]
2+
#[no_mangle]
3+
pub extern fn test_fn(a:fn (i32)->i32)->fn (i32)->i32{
4+
a
5+
}
6+
#[allow(improper_ctypes_definitions)]
7+
#[no_mangle]
8+
pub extern fn test_fn2(a:i32)->i32{
9+
a
10+
}
11+
#[allow(improper_ctypes_definitions)]
12+
#[no_mangle]
13+
pub extern fn return_fn()->fn (i32)->i32{
14+
fn simple(a:i32)->i32{a}
15+
simple
16+
}
17+

0 commit comments

Comments
 (0)