summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs
blob: 2530a1e966d0a8a59e3b1d4ade2acea6fa9dea3a (plain)
1
2
3
4
5
6
7
8
9
// run-pass

unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () {
    func()
}

pub fn main() {
    unsafe { call_unsafe(|| {}); }
}