Skip to content

Commit

Permalink
Use explicit casts to silence warnings. Fixes #3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Mar 29, 2016
1 parent b120714 commit 12109dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ macro_rules! concrete_block_impl {
}

unsafe {
ConcreteBlock::with_invoke(
mem::transmute($f::<$($t,)* R, X>), self)
let f: unsafe extern "C" fn(*mut ConcreteBlock<($($t,)*), R, X>
$(, $a: $t)*) -> R = $f::<$($t,)* R, X>;
let f: unsafe extern "C" fn(*mut ConcreteBlock<($($t,)*), R, X>, ...) -> R =
mem::transmute(f);
ConcreteBlock::with_invoke(f, self)
}
}
}
Expand Down

0 comments on commit 12109dc

Please sign in to comment.