Fix unused fold macro
diff --git a/codegen/src/main.rs b/codegen/src/main.rs
index 37c5edd..44b9d8b 100644
--- a/codegen/src/main.rs
+++ b/codegen/src/main.rs
@@ -990,6 +990,7 @@
 {fold_trait}
 }}
 
+#[cfg(any(feature = \"full\", feature = \"derive\"))]
 macro_rules! fold_span_only {{
     ($f:ident : $t:ident) => {{
         pub fn $f<V: Fold + ?Sized>(_visitor: &mut V, mut _i: $t) -> $t {{