macro_rules! hide_from_rustfmt {
    ($($tt:tt)*) => {
        $($tt)*
    };
}

#[cfg(not(all(
    feature = "derive",
    feature = "full",
    feature = "parsing",
    feature = "printing",
    feature = "visit",
    feature = "visit-mut",
    feature = "fold",
    feature = "clone-impls",
    feature = "extra-traits",
    feature = "proc-macro",
)))]
hide_from_rustfmt! {
    mod error;
}

#[cfg(not(all(
    feature = "derive",
    feature = "full",
    feature = "parsing",
    feature = "printing",
    feature = "visit",
    feature = "visit-mut",
    feature = "fold",
    feature = "clone-impls",
    feature = "extra-traits",
    feature = "proc-macro",
)))]
mod error;

--- 
+++ 
@@ -1,3 +1,9 @@
+macro_rules! hide_from_rustfmt {
+    ($($tt:tt)*) => {
+        $($tt)*
+    };
+}
+
 #[cfg(not(all(
     feature = "derive",
     feature = "full",
@@ -10,4 +16,6 @@
     feature = "extra-traits",
     feature = "proc-macro",
 )))]
-mod error;
+hide_from_rustfmt! {
+    mod error;
+}
Hide the feature check parse error from rustfmt
