diff --git a/src/api.rs b/src/api.rs index 16733f25..b2cc4b31 100644 --- a/src/api.rs +++ b/src/api.rs @@ -453,6 +453,7 @@ impl Engine { /// let mut engine = Engine::new(); /// /// // Register the custom type. + /// # #[cfg(not(feature = "no_object"))] /// engine.register_type::(); /// /// engine.register_fn("new_ts", TestStruct::new); @@ -505,6 +506,7 @@ impl Engine { /// let mut engine = Engine::new(); /// /// // Register the custom type. + /// # #[cfg(not(feature = "no_object"))] /// engine.register_type::(); /// /// engine.register_fn("new_ts", TestStruct::new); @@ -549,6 +551,7 @@ impl Engine { /// let mut engine = Engine::new(); /// /// // Register the custom type. + /// # #[cfg(not(feature = "no_object"))] /// engine.register_type::(); /// /// engine.register_fn("new_ts", TestStruct::new); @@ -601,6 +604,7 @@ impl Engine { /// let mut engine = Engine::new(); /// /// // Register the custom type. + /// # #[cfg(not(feature = "no_object"))] /// engine.register_type::(); /// /// engine.register_fn("new_ts", TestStruct::new); @@ -650,6 +654,7 @@ impl Engine { /// let mut engine = Engine::new(); /// /// // Register the custom type. + /// # #[cfg(not(feature = "no_object"))] /// engine.register_type::(); /// /// engine.register_fn("new_ts", TestStruct::new); diff --git a/src/engine.rs b/src/engine.rs index 66c4de23..ad5b1c0a 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -1134,8 +1134,7 @@ impl Engine { ) -> Result, Box> { self.inc_operations(state)?; - #[cfg(not(feature = "no_index"))] - #[cfg(not(feature = "no_object"))] + #[cfg(any(not(feature = "no_index"), not(feature = "no_object")))] let is_ref = target.is_ref(); let val = target.as_mut(); @@ -1200,7 +1199,6 @@ impl Engine { } } - #[cfg(not(feature = "no_object"))] #[cfg(not(feature = "no_index"))] _ if _indexers => { let type_name = val.type_name();