From 07a61a9562adffa542454e4e23b9929fb49f2dfd Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 25 Feb 2022 09:00:15 +0800 Subject: [PATCH] Fix build. --- src/module/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module/mod.rs b/src/module/mod.rs index 1d277d64..2ba4bf4d 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -1721,7 +1721,8 @@ impl Module { // Variables with an alias left in the scope become module variables for (name, value, mut aliases) in scope { - // It is an error to export function pointers that refer to encapsulated functions + // It is an error to export function pointers that refer to encapsulated local functions + #[cfg(not(feature = "no_function"))] if let Some(fn_ptr) = value.downcast_ref::() { if ast.iter_fn_def().any(|f| f.name == fn_ptr.fn_name()) { return Err(crate::ERR::ErrorMismatchDataType(