Skip to content

Commit 302f2aa

Browse files
committed
Rollup merge of rust-lang#32932 - Manishearth:fx-mir, r=bluss
Make rustc_mir pass rustdoc None
2 parents e548880 + 3e93a6e commit 302f2aa

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

src/librustc_mir/build/matches/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
434434
/// But there may also be candidates that the test just doesn't
435435
/// apply to. For example, consider the case of #29740:
436436
///
437-
/// ```rust
437+
/// ```rust,ignore
438438
/// match x {
439439
/// "foo" => ...,
440440
/// "bar" => ...,

src/librustc_mir/build/matches/util.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ impl<'a,'tcx> Builder<'a,'tcx> {
3232
/// this function converts the prefix (`x`, `y`) and suffix (`z`) into
3333
/// distinct match pairs:
3434
///
35+
/// ```rust,ignore
3536
/// lv[0 of 3] @ x // see ProjectionElem::ConstantIndex (and its Debug impl)
3637
/// lv[1 of 3] @ y // to explain the `[x of y]` notation
3738
/// lv[-1 of 3] @ z
39+
/// ```
3840
///
3941
/// If a slice like `s` is present, then the function also creates
4042
/// a temporary like:
4143
///
44+
/// ```rust,ignore
4245
/// tmp0 = lv[2..-1] // using the special Rvalue::Slice
46+
/// ```
4347
///
4448
/// and creates a match pair `tmp0 @ s`
4549
pub fn prefix_suffix_slice<'pat>(&mut self,

src/librustc_mir/build/scope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set of scheduled drops up front, and so whenever we exit from the
4747
scope we only drop the values scheduled thus far. For example, consider
4848
the scope S corresponding to this loop:
4949
50-
```
50+
```rust,ignore
5151
loop {
5252
let x = ...;
5353
if cond { break; }

src/librustc_mir/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const INDENT: &'static str = " ";
2323
/// If the session is properly configured, dumps a human-readable
2424
/// representation of the mir into:
2525
///
26-
/// ```
26+
/// ```text
2727
/// rustc.node<node_id>.<pass_name>.<disambiguator>
2828
/// ```
2929
///

src/librustc_mir/traversal.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ use rustc::mir::repr::*;
1919
/// Preorder traversal is when each node is visited before an of it's
2020
/// successors
2121
///
22+
/// ```text
23+
///
2224
/// A
2325
/// / \
2426
/// / \
2527
/// B C
2628
/// \ /
2729
/// \ /
2830
/// D
31+
/// ```
2932
///
3033
/// A preorder traversal of this graph is either `A B D C` or `A C D B`
3134
#[derive(Clone)]
@@ -80,13 +83,17 @@ impl<'a, 'tcx> Iterator for Preorder<'a, 'tcx> {
8083
/// Postorder traversal is when each node is visited after all of it's
8184
/// successors, except when the successor is only reachable by a back-edge
8285
///
86+
///
87+
/// ```text
88+
///
8389
/// A
8490
/// / \
8591
/// / \
8692
/// B C
8793
/// \ /
8894
/// \ /
8995
/// D
96+
/// ```
9097
///
9198
/// A Postorder traversal of this graph is `D B C A` or `D C B A`
9299
pub struct Postorder<'a, 'tcx: 'a> {
@@ -215,13 +222,16 @@ impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> {
215222
/// This is different to a preorder traversal and represents a natural
216223
/// linearisation of control-flow.
217224
///
225+
/// ```text
226+
///
218227
/// A
219228
/// / \
220229
/// / \
221230
/// B C
222231
/// \ /
223232
/// \ /
224233
/// D
234+
/// ```
225235
///
226236
/// A reverse postorder traversal of this graph is either `A B C D` or `A C B D`
227237
/// Note that for a graph containing no loops (i.e. A DAG), this is equivalent to

0 commit comments

Comments
 (0)