Skip to content

Commit 3e93a6e

Browse files
committed
Make librustc_mir pass rustdoc --test
1 parent 327ce2e commit 3e93a6e

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-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
///

0 commit comments

Comments
 (0)