Skip to content

Commit cad023b

Browse files
committed
Add more detail to with_function doc
1 parent 6f03fc7 commit cad023b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/engine.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ dispose!{JitEngine, LLVMOpaqueExecutionEngine, LLVMDisposeExecutionEngine}
9797
impl<'a> JitEngine {
9898
/// Run the closure `cb` with the machine code for the function `function`.
9999
///
100+
/// If the function takes multiple arguments, these should be wrapped in a tuple due to
101+
/// the limitations of Rust's type system.
102+
///
100103
/// This will check that the types match at runtime when in debug mode, but not release mode.
101104
/// You should make sure to use debug mode if you want it to error when the types don't match.
102105
pub fn with_function<C, A, R>(&self, function: &'a Function, cb: C) where A:Compile<'a>, R:Compile<'a>, C:FnOnce(extern "C" fn (A) -> R) {

0 commit comments

Comments
 (0)