Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rustc_mir pass rustdoc #32932

Merged
merged 2 commits into from
Apr 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc_mir/build/matches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" => ...,
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_mir/build/matches/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/build/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
/// ```
///
Expand Down
10 changes: 10 additions & 0 deletions src/librustc_mir/traversal.rs
Original file line number Diff line number Diff line change
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