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(