Register snapshots.
This commit is contained in:
parent
eca8f11315
commit
56dbf3d122
13 changed files with 18 additions and 352 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue