Skip to content

rustdoc: Tweaking test generation #15000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/liballoc/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: () = ();

Expand Down
4 changes: 3 additions & 1 deletion src/libcore/failure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down