blob: 1e954f5690956bffc54a033888027c13e16c2704 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// run-pass
// This tests reification from safe function to `unsafe fn` pointer
fn do_nothing() -> () {}
unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () {
func()
}
pub fn main() {
unsafe { call_unsafe(do_nothing); }
}
|