Normalize doc attributes in generated code
diff --git a/codegen/src/main.rs b/codegen/src/main.rs
index df8a81f..ed600ac 100644
--- a/codegen/src/main.rs
+++ b/codegen/src/main.rs
@@ -996,6 +996,7 @@
config.set().emit_mode(rustfmt::EmitMode::Stdout);
config.set().verbose(rustfmt::Verbosity::Quiet);
config.set().format_macro_matchers(true);
+ config.set().normalize_doc_attributes(true);
let mut session = rustfmt::Session::new(config, Some(&mut file));
session
.format(rustfmt::Input::Text(content.to_string()))
diff --git a/src/gen/fold.rs b/src/gen/fold.rs
index 3eb1875..36e9b1d 100644
--- a/src/gen/fold.rs
+++ b/src/gen/fold.rs
@@ -19,13 +19,13 @@
unreachable!()
};
}
-#[doc = r" Syntax tree traversal to transform the nodes of an owned syntax tree."]
-#[doc = r""]
-#[doc = r" See the [module documentation] for details."]
-#[doc = r""]
-#[doc = r" [module documentation]: index.html"]
-#[doc = r""]
-#[doc = r#" *This trait is available if Syn is built with the `"fold"` feature.*"#]
+/// Syntax tree traversal to transform the nodes of an owned syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: index.html
+///
+/// *This trait is available if Syn is built with the `"fold"` feature.*
pub trait Fold {
#[cfg(any(feature = "full", feature = "derive"))]
fn fold_abi(&mut self, i: Abi) -> Abi {
diff --git a/src/gen/visit.rs b/src/gen/visit.rs
index 1118fc9..b82e2d8 100644
--- a/src/gen/visit.rs
+++ b/src/gen/visit.rs
@@ -23,13 +23,13 @@
macro_rules! skip {
($($tt:tt)*) => {};
}
-#[doc = r" Syntax tree traversal to walk a shared borrow of a syntax tree."]
-#[doc = r""]
-#[doc = r" See the [module documentation] for details."]
-#[doc = r""]
-#[doc = r" [module documentation]: index.html"]
-#[doc = r""]
-#[doc = r#" *This trait is available if Syn is built with the `"visit"` feature.*"#]
+/// Syntax tree traversal to walk a shared borrow of a syntax tree.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: index.html
+///
+/// *This trait is available if Syn is built with the `"visit"` feature.*
pub trait Visit<'ast> {
#[cfg(any(feature = "full", feature = "derive"))]
fn visit_abi(&mut self, i: &'ast Abi) {
diff --git a/src/gen/visit_mut.rs b/src/gen/visit_mut.rs
index ce875f5..5124b3c 100644
--- a/src/gen/visit_mut.rs
+++ b/src/gen/visit_mut.rs
@@ -22,14 +22,14 @@
macro_rules! skip {
($($tt:tt)*) => {};
}
-#[doc = r" Syntax tree traversal to mutate an exclusive borrow of a syntax tree in"]
-#[doc = r" place."]
-#[doc = r""]
-#[doc = r" See the [module documentation] for details."]
-#[doc = r""]
-#[doc = r" [module documentation]: index.html"]
-#[doc = r""]
-#[doc = r#" *This trait is available if Syn is built with the `"visit-mut"` feature.*"#]
+/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
+/// place.
+///
+/// See the [module documentation] for details.
+///
+/// [module documentation]: index.html
+///
+/// *This trait is available if Syn is built with the `"visit-mut"` feature.*
pub trait VisitMut {
#[cfg(any(feature = "full", feature = "derive"))]
fn visit_abi_mut(&mut self, i: &mut Abi) {