diff --git a/module/core/clone_dyn/Readme.md b/module/core/clone_dyn/Readme.md index 51f5e9d170..f23c03a8c9 100644 --- a/module/core/clone_dyn/Readme.md +++ b/module/core/clone_dyn/Readme.md @@ -70,9 +70,9 @@ The main function demonstrates the overall usage by creating a vector, obtaining ```rust -# #[ cfg( not( feature = "enabled" ) ) ] +# #[ cfg( not( all( feature = "enabled", feature = "clone_dyn_meta" ) ) ) ] # fn main() {} -# #[ cfg( feature = "enabled" ) ] +# #[ cfg( all( feature = "enabled", feature = "clone_dyn_meta" ) ) ] # fn main() # { diff --git a/module/core/clone_dyn/examples/clone_dyn_trivial.rs b/module/core/clone_dyn/examples/clone_dyn_trivial.rs index f62d7bccfc..cd67d1cbea 100644 --- a/module/core/clone_dyn/examples/clone_dyn_trivial.rs +++ b/module/core/clone_dyn/examples/clone_dyn_trivial.rs @@ -56,9 +56,9 @@ //! The main function demonstrates the overall usage by creating a vector, obtaining an iterator, and using the iterator to print elements. //! -#[ cfg( not( feature = "enabled" ) ) ] +#[ cfg( not( all( feature = "enabled", feature = "clone_dyn_meta" ) ) ) ] fn main() {} -#[ cfg( feature = "enabled" ) ] +#[ cfg( all( feature = "enabled", feature = "clone_dyn_meta" ) ) ] fn main() { use clone_dyn::{ clone_dyn, CloneDyn }; diff --git a/module/core/clone_dyn/tests/inc/mod.rs b/module/core/clone_dyn/tests/inc/mod.rs index 8a1bb73c62..66d5246de4 100644 --- a/module/core/clone_dyn/tests/inc/mod.rs +++ b/module/core/clone_dyn/tests/inc/mod.rs @@ -2,6 +2,10 @@ #[ allow( unused_imports ) ] use super::*; -mod basic_manual; -mod basic; -mod parametrized; +#[ cfg( feature = "clone_dyn_meta" ) ] +mod tests +{ + pub mod basic_manual; + pub mod basic; + pub mod parametrized; +}