Enable DynamicFunc for closures with environment.

This commit is contained in:
losfair
2020-03-12 02:58:36 +08:00
parent 68376116b8
commit 5edd1b5ab7

View File

@ -349,11 +349,6 @@ impl<'a> DynamicFunc<'a> {
} }
} }
// Disable "fat" closures for possible future changes.
if mem::size_of::<F>() != 0 {
unimplemented!("DynamicFunc with captured environment is not yet supported");
}
let mut builder = TrampolineBufferBuilder::new(); let mut builder = TrampolineBufferBuilder::new();
let ctx: Box<PolymorphicContext> = Box::new(PolymorphicContext { let ctx: Box<PolymorphicContext> = Box::new(PolymorphicContext {
arg_types: signature.params().to_vec(), arg_types: signature.params().to_vec(),