rustdoc: Fix testing indented code blocks
The collapse/unindent passes were run in the wrong order, generating different markdown for indented tests.
This commit is contained in:
parent
410d70b5af
commit
19260b043b
@ -25,8 +25,12 @@ use core::result::{Ok, Err, Result};
|
||||
///
|
||||
/// The following two examples are equivalent:
|
||||
///
|
||||
/// let foo = box(HEAP) Bar::new(...);
|
||||
/// let foo = box Bar::new(...);
|
||||
/// use std::owned::HEAP;
|
||||
///
|
||||
/// # struct Bar;
|
||||
/// # impl Bar { fn new(_a: int) { } }
|
||||
/// let foo = box(HEAP) Bar::new(2);
|
||||
/// let foo = box Bar::new(2);
|
||||
#[lang="exchange_heap"]
|
||||
pub static HEAP: () = ();
|
||||
|
||||
|
@ -15,7 +15,9 @@
|
||||
//! useful an upstream crate must define failure for libcore to use. The current
|
||||
//! interface for failure is:
|
||||
//!
|
||||
//! fn begin_unwind(fmt: &fmt::Arguments, file: &str, line: uint) -> !;
|
||||
//! ```ignore
|
||||
//! fn begin_unwind(fmt: &fmt::Arguments, file: &str, line: uint) -> !;
|
||||
//! ```
|
||||
//!
|
||||
//! This definition allows for failing with any general message, but it does not
|
||||
//! allow for failing with a `~Any` value. The reason for this is that libcore
|
||||
|
@ -86,8 +86,8 @@ pub fn run(input: &str,
|
||||
let mut v = RustdocVisitor::new(&*ctx, None);
|
||||
v.visit(&ctx.krate);
|
||||
let krate = v.clean();
|
||||
let (krate, _) = passes::unindent_comments(krate);
|
||||
let (krate, _) = passes::collapse_docs(krate);
|
||||
let (krate, _) = passes::unindent_comments(krate);
|
||||
|
||||
let mut collector = Collector::new(krate.name.to_string(),
|
||||
libs,
|
||||
|
@ -24,7 +24,7 @@
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! use std::rt::deque::BufferPool;
|
||||
//! use std::sync::deque::BufferPool;
|
||||
//!
|
||||
//! let mut pool = BufferPool::new();
|
||||
//! let (mut worker, mut stealer) = pool.deque();
|
||||
|
Loading…
Reference in New Issue
Block a user