about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_mir/build/matches/mod.rs2
-rw-r--r--src/librustc_mir/build/matches/util.rs4
-rw-r--r--src/librustc_mir/build/scope.rs2
-rw-r--r--src/librustc_mir/pretty.rs2
-rw-r--r--src/librustc_mir/traversal.rs10
5 files changed, 17 insertions, 3 deletions
diff --git a/src/librustc_mir/build/matches/mod.rs b/src/librustc_mir/build/matches/mod.rs
index cabf5c95546..ccb2099dcc7 100644
--- a/src/librustc_mir/build/matches/mod.rs
+++ b/src/librustc_mir/build/matches/mod.rs
@@ -434,7 +434,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
     /// But there may also be candidates that the test just doesn't
     /// apply to. For example, consider the case of #29740:
     ///
-    /// ```rust
+    /// ```rust,ignore
     /// match x {
     ///     "foo" => ...,
     ///     "bar" => ...,
diff --git a/src/librustc_mir/build/matches/util.rs b/src/librustc_mir/build/matches/util.rs
index 101d7594309..e5f2c754378 100644
--- a/src/librustc_mir/build/matches/util.rs
+++ b/src/librustc_mir/build/matches/util.rs
@@ -32,14 +32,18 @@ impl<'a,'tcx> Builder<'a,'tcx> {
     /// this function converts the prefix (`x`, `y`) and suffix (`z`) into
     /// distinct match pairs:
     ///
+    /// ```rust,ignore
     ///     lv[0 of 3] @ x  // see ProjectionElem::ConstantIndex (and its Debug impl)
     ///     lv[1 of 3] @ y  // to explain the `[x of y]` notation
     ///     lv[-1 of 3] @ z
+    /// ```
     ///
     /// If a slice like `s` is present, then the function also creates
     /// a temporary like:
     ///
+    /// ```rust,ignore
     ///     tmp0 = lv[2..-1] // using the special Rvalue::Slice
+    /// ```
     ///
     /// and creates a match pair `tmp0 @ s`
     pub fn prefix_suffix_slice<'pat>(&mut self,
diff --git a/src/librustc_mir/build/scope.rs b/src/librustc_mir/build/scope.rs
index 84fda62067d..bfbf27d46d0 100644
--- a/src/librustc_mir/build/scope.rs
+++ b/src/librustc_mir/build/scope.rs
@@ -47,7 +47,7 @@ set of scheduled drops up front, and so whenever we exit from the
 scope we only drop the values scheduled thus far. For example, consider
 the scope S corresponding to this loop:
 
-```
+```rust,ignore
 loop {
     let x = ...;
     if cond { break; }
diff --git a/src/librustc_mir/pretty.rs b/src/librustc_mir/pretty.rs
index e9c9edd1183..77e8e37ef74 100644
--- a/src/librustc_mir/pretty.rs
+++ b/src/librustc_mir/pretty.rs
@@ -23,7 +23,7 @@ const INDENT: &'static str = "    ";
 /// If the session is properly configured, dumps a human-readable
 /// representation of the mir into:
 ///
-/// ```
+/// ```text
 /// rustc.node<node_id>.<pass_name>.<disambiguator>
 /// ```
 ///
diff --git a/src/librustc_mir/traversal.rs b/src/librustc_mir/traversal.rs
index 8b6821136f5..c58b5c87724 100644
--- a/src/librustc_mir/traversal.rs
+++ b/src/librustc_mir/traversal.rs
@@ -19,6 +19,8 @@ use rustc::mir::repr::*;
 /// Preorder traversal is when each node is visited before an of it's
 /// successors
 ///
+/// ```text
+///
 ///         A
 ///        / \
 ///       /   \
@@ -26,6 +28,7 @@ use rustc::mir::repr::*;
 ///       \   /
 ///        \ /
 ///         D
+/// ```
 ///
 /// A preorder traversal of this graph is either `A B D C` or `A C D B`
 #[derive(Clone)]
@@ -80,6 +83,9 @@ 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
 ///        / \
 ///       /   \
@@ -87,6 +93,7 @@ impl<'a, 'tcx> Iterator for Preorder<'a, 'tcx> {
 ///       \   /
 ///        \ /
 ///         D
+/// ```
 ///
 /// A Postorder traversal of this graph is `D B C A` or `D C B A`
 pub struct Postorder<'a, 'tcx: 'a> {
@@ -215,6 +222,8 @@ 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
 ///        / \
 ///       /   \
@@ -222,6 +231,7 @@ impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> {
 ///       \   /
 ///        \ /
 ///         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