From ff4827064b7b66aa871c1a05ad31e08527892d0c Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 3 Dec 2021 11:52:34 +0800 Subject: [PATCH] Fix build. --- tests/options.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/options.rs b/tests/options.rs index 09a79a3c..01574e74 100644 --- a/tests/options.rs +++ b/tests/options.rs @@ -16,11 +16,14 @@ fn test_options() -> Result<(), Box> { assert!(engine.compile("let x = { let z = 0; z + 1 };").is_err()); - engine.compile("let x = || 42;")?; + #[cfg(not(feature = "no_function"))] + { + engine.compile("let x = || 42;")?; - engine.set_allow_anonymous_fn(false); + engine.set_allow_anonymous_fn(false); - assert!(engine.compile("let x = || 42;").is_err()); + assert!(engine.compile("let x = || 42;").is_err()); + } engine.compile("while x > y { foo(z); }")?;