Documentation of the syntax tree traversals
diff --git a/codegen/src/main.rs b/codegen/src/main.rs
index 5ce71ae..ac674a0 100644
--- a/codegen/src/main.rs
+++ b/codegen/src/main.rs
@@ -1006,9 +1006,6 @@
"\
// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
-//! A Fold represents an AST->AST fold; it accepts an AST piece,
-//! and returns a piece of the same type.
-
#![cfg_attr(rustfmt, rustfmt_skip)]
// Unreachable code is generated sometimes without the full feature.
@@ -1024,18 +1021,11 @@
{full_macro}
-/// AST->AST fold.
+/// Syntax tree traversal to transform the nodes of an owned syntax tree.
///
-/// Each method of the Fold trait is a hook to be potentially overridden. Each
-/// method's default implementation recursively visits the substructure of the
-/// input via the `walk` functions, which perform an \"identity fold\", that
-/// is, they return the same structure that they are given (for example the
-/// `fold_file` method by default calls `fold::walk_file`).
+/// See the [module documentation] for details.
///
-/// If you want to ensure that your code handles every variant
-/// explicitly, you need to override each method. (And you also need
-/// to monitor future changes to `Fold` in case a new method with a
-/// new default implementation gets introduced.)
+/// [module documentation]: index.html
pub trait Fold {{
{fold_trait}
}}
@@ -1078,11 +1068,6 @@
"\
// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
-//! AST walker. Each overridden visit method has full control over what
-//! happens with its node, it can do its own traversal of the node's children,
-//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
-//! deeper traversal by doing nothing.
-
#![cfg_attr(rustfmt, rustfmt_skip)]
#![cfg_attr(feature = \"cargo-clippy\", allow(match_same_arms))]
@@ -1096,15 +1081,11 @@
{full_macro}
-/// Each method of the Visit trait is a hook to be potentially
-/// overridden. Each method's default implementation recursively visits
-/// the substructure of the input via the corresponding `walk` method;
-/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
+/// Syntax tree traversal to walk a shared borrow of a syntax tree.
///
-/// If you want to ensure that your code handles every variant
-/// explicitly, you need to override each method. (And you also need
-/// to monitor future changes to `Visit` in case a new method with a
-/// new default implementation gets introduced.)
+/// See the [module documentation] for details.
+///
+/// [module documentation]: index.html
pub trait Visit<'ast> {{
{visit_trait}
}}
@@ -1122,11 +1103,6 @@
"\
// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT
-//! AST walker. Each overridden visit method has full control over what
-//! happens with its node, it can do its own traversal of the node's children,
-//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
-//! deeper traversal by doing nothing.
-
#![cfg_attr(rustfmt, rustfmt_skip)]
#![cfg_attr(feature = \"cargo-clippy\", allow(match_same_arms))]
@@ -1140,15 +1116,12 @@
{full_macro}
-/// Each method of the VisitMut trait is a hook to be potentially
-/// overridden. Each method's default implementation recursively visits
-/// the substructure of the input via the corresponding `walk` method;
-/// e.g. the `visit_mod` method by default calls `visit::walk_mod`.
+/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in
+/// place.
///
-/// If you want to ensure that your code handles every variant
-/// explicitly, you need to override each method. (And you also need
-/// to monitor future changes to `VisitMut` in case a new method with a
-/// new default implementation gets introduced.)
+/// See the [module documentation] for details.
+///
+/// [module documentation]: index.html
pub trait VisitMut {{
{visit_mut_trait}
}}