about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-06-09 13:12:30 -0700
committerCorey Richardson <corey@octayn.net>2014-07-09 00:06:27 -0700
commit4989a56448c7e3047e0538ff4ef54c49db8a5a4f (patch)
tree99a15ab91675cd360008b542c3cde8a1f74d6f86 /src/libsyntax/visit.rs
parent5716abe3f019ab7d9c8cdde9879332040191cf88 (diff)
downloadrust-4989a56448c7e3047e0538ff4ef54c49db8a5a4f.tar.gz
rust-4989a56448c7e3047e0538ff4ef54c49db8a5a4f.zip
syntax: doc comments all the things
Diffstat (limited to 'src/libsyntax/visit.rs')
-rw-r--r--src/libsyntax/visit.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index df34ff30db6..9298b58c426 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -8,6 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+//! Context-passing 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 (potentially passing in different contexts to each), call
+//! `visit::visit_*` to apply the default traversal algorithm (again, it can
+//! override the context), or prevent deeper traversal by doing nothing.
+//!
+//! Note: it is an important invariant that the default visitor walks the body
+//! of a function in "execution order" (more concretely, reverse post-order
+//! with respect to the CFG implied by the AST), meaning that if AST node A may
+//! execute before AST node B, then A is visited first.  The borrow checker in
+//! particular relies on this property.
+//!
 use abi::Abi;
 use ast::*;
 use ast;
@@ -17,27 +29,15 @@ use owned_slice::OwnedSlice;
 
 use std::gc::Gc;
 
-// Context-passing 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 (potentially passing in different contexts to each), call
-// visit::visit_* to apply the default traversal algorithm (again, it can
-// override the context), or prevent deeper traversal by doing nothing.
-//
-// Note: it is an important invariant that the default visitor walks the body
-// of a function in "execution order" (more concretely, reverse post-order
-// with respect to the CFG implied by the AST), meaning that if AST node A may
-// execute before AST node B, then A is visited first.  The borrow checker in
-// particular relies on this property.
-
 pub enum FnKind<'a> {
-    // fn foo() or extern "Abi" fn foo()
+    /// fn foo() or extern "Abi" fn foo()
     FkItemFn(Ident, &'a Generics, FnStyle, Abi),
 
-    // fn foo(&self)
+    /// fn foo(&self)
     FkMethod(Ident, &'a Generics, &'a Method),
 
-    // |x, y| ...
-    // proc(x, y) ...
+    /// |x, y| ...
+    /// proc(x, y) ...
     FkFnBlock,
 }