]>
Commit | Line | Data |
---|---|---|
416331ca | 1 | // run-pass |
c30ab7b3 | 2 | // This tests reification from safe function to `unsafe fn` pointer |
d9579d0f | 3 | |
c30ab7b3 SL |
4 | fn do_nothing() -> () {} |
5 | ||
6 | unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () { | |
7 | func() | |
8 | } | |
9 | ||
10 | pub fn main() { | |
11 | unsafe { call_unsafe(do_nothing); } | |
223e47cc | 12 | } |