From 5edd1b5ab73868e60d8cdb28fbf6a133065733cb Mon Sep 17 00:00:00 2001 From: losfair Date: Thu, 12 Mar 2020 02:58:36 +0800 Subject: [PATCH] Enable `DynamicFunc` for closures with environment. --- lib/runtime-core/src/typed_func.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/runtime-core/src/typed_func.rs b/lib/runtime-core/src/typed_func.rs index 0b29d54ea..b1d1399e9 100644 --- a/lib/runtime-core/src/typed_func.rs +++ b/lib/runtime-core/src/typed_func.rs @@ -349,11 +349,6 @@ impl<'a> DynamicFunc<'a> { } } - // Disable "fat" closures for possible future changes. - if mem::size_of::() != 0 { - unimplemented!("DynamicFunc with captured environment is not yet supported"); - } - let mut builder = TrampolineBufferBuilder::new(); let ctx: Box = Box::new(PolymorphicContext { arg_types: signature.params().to_vec(),