1
Fork 0

Make librustc_mir pass rustdoc --test

This commit is contained in:
Manish Goregaokar 2016-04-13 16:16:14 +05:30
parent 327ce2ecf9
commit 3e93a6e265
4 changed files with 7 additions and 3 deletions

View file

@ -434,7 +434,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
/// But there may also be candidates that the test just doesn't /// But there may also be candidates that the test just doesn't
/// apply to. For example, consider the case of #29740: /// apply to. For example, consider the case of #29740:
/// ///
/// ```rust /// ```rust,ignore
/// match x { /// match x {
/// "foo" => ..., /// "foo" => ...,
/// "bar" => ..., /// "bar" => ...,

View file

@ -32,14 +32,18 @@ impl<'a,'tcx> Builder<'a,'tcx> {
/// this function converts the prefix (`x`, `y`) and suffix (`z`) into /// this function converts the prefix (`x`, `y`) and suffix (`z`) into
/// distinct match pairs: /// distinct match pairs:
/// ///
/// ```rust,ignore
/// lv[0 of 3] @ x // see ProjectionElem::ConstantIndex (and its Debug impl) /// 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] @ y // to explain the `[x of y]` notation
/// lv[-1 of 3] @ z /// lv[-1 of 3] @ z
/// ```
/// ///
/// If a slice like `s` is present, then the function also creates /// If a slice like `s` is present, then the function also creates
/// a temporary like: /// a temporary like:
/// ///
/// ```rust,ignore
/// tmp0 = lv[2..-1] // using the special Rvalue::Slice /// tmp0 = lv[2..-1] // using the special Rvalue::Slice
/// ```
/// ///
/// and creates a match pair `tmp0 @ s` /// and creates a match pair `tmp0 @ s`
pub fn prefix_suffix_slice<'pat>(&mut self, pub fn prefix_suffix_slice<'pat>(&mut self,

View file

@ -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 scope we only drop the values scheduled thus far. For example, consider
the scope S corresponding to this loop: the scope S corresponding to this loop:
``` ```rust,ignore
loop { loop {
let x = ...; let x = ...;
if cond { break; } if cond { break; }

View file

@ -23,7 +23,7 @@ const INDENT: &'static str = " ";
/// If the session is properly configured, dumps a human-readable /// If the session is properly configured, dumps a human-readable
/// representation of the mir into: /// representation of the mir into:
/// ///
/// ``` /// ```text
/// rustc.node<node_id>.<pass_name>.<disambiguator> /// rustc.node<node_id>.<pass_name>.<disambiguator>
/// ``` /// ```
/// ///