mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Rollup merge of #32932 - Manishearth:fx-mir, r=bluss
Make rustc_mir pass rustdoc None
This commit is contained in:
commit
302f2aa01c
@ -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" => ...,
|
||||
|
@ -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,
|
||||
|
@ -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; }
|
||||
|
@ -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>
|
||||
/// ```
|
||||
///
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user