diff --git a/codegen/src/test/custom_type.rs b/codegen/src/test/custom_type.rs index e18e36bc0..5da634677 100644 --- a/codegen/src/test/custom_type.rs +++ b/codegen/src/test/custom_type.rs @@ -10,7 +10,6 @@ mod custom_type_tests { #[derive(Clone, CustomType)] pub struct Bar( #[rhai_type(skip)] - #[cfg(not(feature = "no_float"))] rhai::FLOAT, INT, #[rhai_type(name = "boo", readonly)] @@ -49,7 +48,6 @@ mod custom_type_tests { #[derive(CustomType)] #[rhai_type(skip, name = "MyFoo", extra = Self::build_extra)] pub struct Foo { - #[cfg(not(feature = "no_float"))] #[rhai_type(skip)] _dummy: rhai::FLOAT, #[rhai_type(get = get_bar)] @@ -100,7 +98,6 @@ mod custom_type_tests { #[derive(Clone, CustomType)] pub struct Bar( #[rhai_type(skip)] - #[cfg(not(feature = "no_float"))] rhai::FLOAT, INT, /// boo comments. @@ -143,7 +140,6 @@ mod custom_type_tests { #[derive(CustomType)] #[rhai_type(skip, name = "MyFoo", extra = Self::build_extra)] pub struct Foo { - #[cfg(not(feature = "no_float"))] #[rhai_type(skip)] _dummy: rhai::FLOAT, #[rhai_type(get = get_bar)] diff --git a/codegen/src/test/module.rs b/codegen/src/test/module.rs index 39d2374c6..34097b1c4 100644 --- a/codegen/src/test/module.rs +++ b/codegen/src/test/module.rs @@ -1470,7 +1470,6 @@ mod generate_tests { fn one_fn_with_cfg_module() { let input_tokens: TokenStream = quote! { pub mod one_fn { - #[cfg(not(feature = "no_float"))] pub mod it_is { pub fn increment(x: &mut FLOAT) { *x += 1.0 as FLOAT; @@ -1482,7 +1481,6 @@ mod generate_tests { let expected_tokens = quote! { #[allow(clippy::needless_pass_by_value, clippy::needless_pass_by_ref_mut)] pub mod one_fn { - #[cfg(not(feature = "no_float"))] #[allow(clippy::needless_pass_by_value, clippy::needless_pass_by_ref_mut)] pub mod it_is { pub fn increment(x: &mut FLOAT) { @@ -1541,10 +1539,8 @@ mod generate_tests { #[inline(always)] pub fn rhai_generate_into_module(_m: &mut Module, _flatten: bool) { if _flatten { - #[cfg(not(feature = "no_float"))] self::it_is::rhai_generate_into_module(_m, _flatten); } else { - #[cfg(not(feature = "no_float"))] _m.set_sub_module("it_is", self::it_is::rhai_module_generate()); } } diff --git a/codegen/tests/test_custom_type.rs b/codegen/tests/test_custom_type.rs index 4e748aa7c..75e3f9d79 100644 --- a/codegen/tests/test_custom_type.rs +++ b/codegen/tests/test_custom_type.rs @@ -4,9 +4,7 @@ use rhai::{CustomType, Engine, TypeBuilder, INT}; #[derive(Clone, CustomType)] pub struct Bar( - #[rhai_type(skip)] - #[cfg(not(feature = "no_float"))] // check other attributes - rhai::FLOAT, + #[rhai_type(skip)] rhai::FLOAT, INT, #[rhai_type(name = "boo", readonly)] String, Vec, @@ -15,7 +13,6 @@ pub struct Bar( #[derive(Clone, Default, CustomType)] #[rhai_type(name = "MyFoo", extra = Self::build_extra)] pub struct Foo { - #[cfg(not(feature = "no_float"))] // check other attributes #[rhai_type(skip)] _dummy: rhai::FLOAT, #[rhai_type(get = get_bar)]