Format with rustfmt 0.8.2
diff --git a/src/lib.rs b/src/lib.rs
index 9507092..2f0872b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -264,17 +264,31 @@
#![cfg_attr(
feature = "cargo-clippy",
allow(
- const_static_lifetime, doc_markdown, large_enum_variant, match_bool, redundant_closure,
- needless_pass_by_value, redundant_field_names, trivially_copy_pass_by_ref
+ const_static_lifetime,
+ doc_markdown,
+ large_enum_variant,
+ match_bool,
+ redundant_closure,
+ needless_pass_by_value,
+ redundant_field_names,
+ trivially_copy_pass_by_ref
)
)]
// Ignored clippy_pedantic lints.
#![cfg_attr(
feature = "cargo-clippy",
allow(
- cast_possible_truncation, cast_possible_wrap, if_not_else, indexing_slicing,
- items_after_statements, similar_names, single_match_else, stutter,
- unseparated_literal_suffix, use_self, used_underscore_binding
+ cast_possible_truncation,
+ cast_possible_wrap,
+ if_not_else,
+ indexing_slicing,
+ items_after_statements,
+ similar_names,
+ single_match_else,
+ stutter,
+ unseparated_literal_suffix,
+ use_self,
+ used_underscore_binding
)
)]
@@ -339,7 +353,12 @@
PredicateLifetime, PredicateType, TraitBound, TraitBoundModifier, TypeParam, TypeParamBound,
WhereClause, WherePredicate,
};
-#[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
+#[cfg(
+ all(
+ any(feature = "full", feature = "derive"),
+ feature = "printing"
+ )
+)]
pub use generics::{ImplGenerics, Turbofish, TypeGenerics};
#[cfg(feature = "full")]
@@ -399,7 +418,12 @@
#[cfg(any(feature = "full", feature = "derive"))]
mod path;
-#[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
+#[cfg(
+ all(
+ any(feature = "full", feature = "derive"),
+ feature = "printing"
+ )
+)]
pub use path::PathTokens;
#[cfg(any(feature = "full", feature = "derive"))]
pub use path::{
@@ -734,10 +758,20 @@
Ok(file)
}
-#[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
+#[cfg(
+ all(
+ any(feature = "full", feature = "derive"),
+ feature = "printing"
+ )
+)]
struct TokensOrDefault<'a, T: 'a>(&'a Option<T>);
-#[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
+#[cfg(
+ all(
+ any(feature = "full", feature = "derive"),
+ feature = "printing"
+ )
+)]
impl<'a, T> quote::ToTokens for TokensOrDefault<'a, T>
where
T: quote::ToTokens + Default,
diff --git a/src/macros.rs b/src/macros.rs
index 0017d50..e9b7034 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -113,7 +113,12 @@
)
}
-#[cfg(all(feature = "printing", any(feature = "full", feature = "derive")))]
+#[cfg(
+ all(
+ feature = "printing",
+ any(feature = "full", feature = "derive")
+ )
+)]
macro_rules! generate_to_tokens {
(do_not_generate_to_tokens $($foo:tt)*) => ();
@@ -149,7 +154,13 @@
};
}
-#[cfg(all(feature = "printing", feature = "derive", not(feature = "full")))]
+#[cfg(
+ all(
+ feature = "printing",
+ feature = "derive",
+ not(feature = "full")
+ )
+)]
macro_rules! to_tokens_call {
// If the variant is marked as #full, don't auto-generate to-tokens for it.
($e:ident, $tokens:ident, #full $($rest:tt)*) => {
@@ -172,7 +183,12 @@
($($rest:tt)*) => (ast_struct! { $($rest)* });
}
-#[cfg(all(feature = "parsing", any(feature = "full", feature = "derive")))]
+#[cfg(
+ all(
+ feature = "parsing",
+ any(feature = "full", feature = "derive")
+ )
+)]
macro_rules! impl_synom {
($t:ident $description:tt $($parser:tt)+) => {
impl Synom for $t {