Auto merge of #44274 - Mark-Simulacrum:rustdoc-tests, r=alexcrichton

Test rustdoc.

Also fixes the broken tests.

r? @alexcrichton
This commit is contained in:
bors 2017-09-10 01:24:14 +00:00
commit f982ff05db
5 changed files with 79 additions and 13 deletions

View file

@ -7,6 +7,8 @@ build = "build.rs"
[lib]
name = "rustdoc"
path = "lib.rs"
# SNAP/stage0(cargo)
doctest = false
[dependencies]
env_logger = { version = "0.4", default-features = false }

View file

@ -15,13 +15,8 @@
//! the AST (e.g. see all of `clean::inline`), but this is not always a
//! non-lossy transformation. The current format of storage for where clauses
//! for functions and such is simply a list of predicates. One example of this
//! is that the AST predicate of:
//!
//! where T: Trait<Foo=Bar>
//!
//! is encoded as:
//!
//! where T: Trait, <T as Trait>::Foo = Bar
//! is that the AST predicate of: `where T: Trait<Foo=Bar>` is encoded as:
//! `where T: Trait, <T as Trait>::Foo = Bar`.
//!
//! This module attempts to reconstruct the original where and/or parameter
//! bounds by special casing scenarios such as these. Fun!

View file

@ -16,10 +16,12 @@
//! of `fmt::Display`. Example usage:
//!
//! ```
//! use rustdoc::html::markdown::Markdown;
//! #![feature(rustc_private)]
//!
//! use rustdoc::html::markdown::{RenderType, Markdown};
//!
//! let s = "My *markdown* _text_";
//! let html = format!("{}", Markdown(s));
//! let html = format!("{}", Markdown(s, RenderType::Pulldown));
//! // ... something using html
//! ```