Register snapshots.

This commit is contained in:
Eduard Burtescu 2014-11-01 19:51:16 +02:00
parent eca8f11315
commit 56dbf3d122
13 changed files with 18 additions and 352 deletions

View file

@ -16,18 +16,15 @@
struct Foo { foo: uint }
impl FnOnce<(), uint> for Foo {
#[rust_call_abi_hack]
fn call_once(self, _: ()) -> uint { self.foo }
extern "rust-call" fn call_once(self, _: ()) -> uint { self.foo }
}
impl FnOnce<(uint,), uint> for Foo {
#[rust_call_abi_hack]
fn call_once(self, (x,): (uint,)) -> uint { self.foo + x }
extern "rust-call" fn call_once(self, (x,): (uint,)) -> uint { self.foo + x }
}
impl FnOnce<(uint, uint), uint> for Foo {
#[rust_call_abi_hack]
fn call_once(self, (x, y): (uint, uint)) -> uint { self.foo + x + y }
extern "rust-call" fn call_once(self, (x, y): (uint, uint)) -> uint { self.foo + x + y }
}
fn main() {