Skip to content

Commit

Permalink
Make librustc_mir pass rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Apr 13, 2016
1 parent a43eb4e commit 327ce2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/librustc_mir/traversal.rs
Expand Up @@ -19,13 +19,16 @@ use rustc::mir::repr::*;
/// Preorder traversal is when each node is visited before an of it's
/// successors
///
/// ```text
///
/// A
/// / \
/// / \
/// B C
/// \ /
/// \ /
/// D
/// ```
///
/// A preorder traversal of this graph is either `A B D C` or `A C D B`
#[derive(Clone)]
Expand Down Expand Up @@ -80,13 +83,17 @@ impl<'a, 'tcx> Iterator for Preorder<'a, 'tcx> {
/// Postorder traversal is when each node is visited after all of it's
/// successors, except when the successor is only reachable by a back-edge
///
///
/// ```text
///
/// A
/// / \
/// / \
/// B C
/// \ /
/// \ /
/// D
/// ```
///
/// A Postorder traversal of this graph is `D B C A` or `D C B A`
pub struct Postorder<'a, 'tcx: 'a> {
Expand Down Expand Up @@ -215,13 +222,16 @@ impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> {
/// This is different to a preorder traversal and represents a natural
/// linearisation of control-flow.
///
/// ```text
///
/// A
/// / \
/// / \
/// B C
/// \ /
/// \ /
/// D
/// ```
///
/// A reverse postorder traversal of this graph is either `A B C D` or `A C B D`
/// Note that for a graph containing no loops (i.e. A DAG), this is equivalent to
Expand Down

0 comments on commit 327ce2e

Please sign in to comment.