auto merge of #15000 : alexcrichton/rust/fix-rustdoc-tests, r=huonw
Commits have the descriptions.
This commit is contained in:
commit
fe931c00cc
5 changed files with 15 additions and 7 deletions
|
@ -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,
|
||||
|
@ -209,7 +209,9 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool) -> String {
|
|||
");
|
||||
}
|
||||
|
||||
if !s.contains("extern crate") {
|
||||
// Don't inject `extern crate std` because it's already injected by the
|
||||
// compiler.
|
||||
if !s.contains("extern crate") && cratename != Some("std") {
|
||||
match cratename {
|
||||
Some(cratename) => {
|
||||
if s.contains(cratename) {
|
||||
|
|
|
@ -420,7 +420,7 @@ use str;
|
|||
use string;
|
||||
use slice::Vector;
|
||||
|
||||
pub use core::fmt::{Formatter, Result, FormatWriter, Show, rt};
|
||||
pub use core::fmt::{Formatter, Result, FormatWriter, rt};
|
||||
pub use core::fmt::{Show, Bool, Char, Signed, Unsigned, Octal, Binary};
|
||||
pub use core::fmt::{LowerHex, UpperHex, String, Pointer};
|
||||
pub use core::fmt::{Float, LowerExp, UpperExp};
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue