aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnnop.rs
blob: 13b93797ba55ff67083272311728f2caa3acb9a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This module needs the following features.
//
//#![feature(unboxed_closures)]
//#![feature(fn_traits)]
use core::cell::UnsafeCell;

pub struct FnNOP();

impl Fn<()> for FnNOP {
    extern "rust-call" fn call(&self, _args: ()) {}
}
impl FnMut<()> for FnNOP {
    extern "rust-call" fn call_mut(&mut self, _args: ()) {}
}
impl FnOnce<()> for FnNOP {
    type Output = ();
    extern "rust-call" fn call_once(self, _args: ()) {}
}

pub static mut NOP: UnsafeCell<FnNOP> = UnsafeCell::new(FnNOP());