Fix doctest errors in rustdoc comments

Mostly this disables doctest for comments that are not actually tests.
This commit is contained in:
Matt Brubeck 2014-09-17 14:05:21 -07:00
parent 787a683365
commit a939cc50bb
5 changed files with 15 additions and 12 deletions

View file

@ -484,7 +484,7 @@ impl<'a> GlyphInfo<'a> {
/// Simple glyphs are stored inline in the `entry_buffer`, detailed glyphs are /// Simple glyphs are stored inline in the `entry_buffer`, detailed glyphs are
/// stored as pointers into the `detail_store`. /// stored as pointers into the `detail_store`.
/// ///
/// ~~~ /// ~~~ignore
/// +- GlyphStore --------------------------------+ /// +- GlyphStore --------------------------------+
/// | +---+---+---+---+---+---+---+ | /// | +---+---+---+---+---+---+---+ |
/// | entry_buffer: | | s | | s | | s | s | | d = detailed /// | entry_buffer: | | s | | s | | s | s | | d = detailed

View file

@ -109,14 +109,17 @@ pub struct InlineFragmentsConstructionResult {
/// Represents an {ib} split that has not yet found the containing block that it belongs to. This /// Represents an {ib} split that has not yet found the containing block that it belongs to. This
/// is somewhat tricky. An example may be helpful. For this DOM fragment: /// is somewhat tricky. An example may be helpful. For this DOM fragment:
/// ///
/// ```html
/// <span> /// <span>
/// A /// A
/// <div>B</div> /// <div>B</div>
/// C /// C
/// </span> /// </span>
/// ```
/// ///
/// The resulting `ConstructionItem` for the outer `span` will be: /// The resulting `ConstructionItem` for the outer `span` will be:
/// ///
/// ```ignore
/// InlineFragmentsConstructionItem(Some(~[ /// InlineFragmentsConstructionItem(Some(~[
/// InlineBlockSplit { /// InlineBlockSplit {
/// predecessor_fragments: ~[ /// predecessor_fragments: ~[
@ -128,6 +131,7 @@ pub struct InlineFragmentsConstructionResult {
/// }),~[ /// }),~[
/// C /// C
/// ]) /// ])
/// ```
pub struct InlineBlockSplit { pub struct InlineBlockSplit {
/// The inline fragments that precede the flow. /// The inline fragments that precede the flow.
pub predecessors: InlineFragments, pub predecessors: InlineFragments,

View file

@ -250,7 +250,7 @@ impl CORSCache for CORSCacheSender {
/// A simple task-based CORS Cache that can be sent messages /// A simple task-based CORS Cache that can be sent messages
/// ///
/// #Example /// #Example
/// ``` /// ```ignore
/// let task = CORSCacheTask::new(); /// let task = CORSCacheTask::new();
/// let builder = TaskBuilder::new().named("XHRTask"); /// let builder = TaskBuilder::new().named("XHRTask");
/// let mut sender = task.get_sender(); /// let mut sender = task.get_sender();

View file

@ -137,7 +137,7 @@ impl<I: RangeIndex> Range<I> {
/// Create a new range from beginning and length offsets. This could be /// Create a new range from beginning and length offsets. This could be
/// denoted as `[begin, begin + length)`. /// denoted as `[begin, begin + length)`.
/// ///
/// ~~~ /// ~~~ignore
/// |-- begin ->|-- length ->| /// |-- begin ->|-- length ->|
/// | | | /// | | |
/// <- o - - - - - +============+ - - - -> /// <- o - - - - - +============+ - - - ->
@ -154,7 +154,7 @@ impl<I: RangeIndex> Range<I> {
/// The index offset to the beginning of the range. /// The index offset to the beginning of the range.
/// ///
/// ~~~ /// ~~~ignore
/// |-- begin ->| /// |-- begin ->|
/// | | /// | |
/// <- o - - - - - +============+ - - - -> /// <- o - - - - - +============+ - - - ->
@ -164,7 +164,7 @@ impl<I: RangeIndex> Range<I> {
/// The index offset from the beginning to the end of the range. /// The index offset from the beginning to the end of the range.
/// ///
/// ~~~ /// ~~~ignore
/// |-- length ->| /// |-- length ->|
/// | | /// | |
/// <- o - - - - - +============+ - - - -> /// <- o - - - - - +============+ - - - ->
@ -174,7 +174,7 @@ impl<I: RangeIndex> Range<I> {
/// The index offset to the end of the range. /// The index offset to the end of the range.
/// ///
/// ~~~ /// ~~~ignore
/// |--------- end --------->| /// |--------- end --------->|
/// | | /// | |
/// <- o - - - - - +============+ - - - -> /// <- o - - - - - +============+ - - - ->
@ -184,7 +184,7 @@ impl<I: RangeIndex> Range<I> {
/// `true` if the index is between the beginning and the end of the range. /// `true` if the index is between the beginning and the end of the range.
/// ///
/// ~~~ /// ~~~ignore
/// false true false /// false true false
/// | | | /// | | |
/// <- o - - + - - +=====+======+ - + - -> /// <- o - - + - - +=====+======+ - + - ->
@ -202,7 +202,7 @@ impl<I: RangeIndex> Range<I> {
/// Shift the entire range by the supplied index delta. /// Shift the entire range by the supplied index delta.
/// ///
/// ~~~ /// ~~~ignore
/// |-- delta ->| /// |-- delta ->|
/// | | /// | |
/// <- o - +============+ - - - - - | - - - -> /// <- o - +============+ - - - - - | - - - ->
@ -216,7 +216,7 @@ impl<I: RangeIndex> Range<I> {
/// Extend the end of the range by the supplied index delta. /// Extend the end of the range by the supplied index delta.
/// ///
/// ~~~ /// ~~~ignore
/// |-- delta ->| /// |-- delta ->|
/// | | /// | |
/// <- o - - - - - +====+ - - - - - | - - - -> /// <- o - - - - - +====+ - - - - - | - - - ->
@ -230,7 +230,7 @@ impl<I: RangeIndex> Range<I> {
/// Move the end of the range to the target index. /// Move the end of the range to the target index.
/// ///
/// ~~~ /// ~~~ignore
/// target /// target
/// | /// |
/// <- o - - - - - +====+ - - - - - | - - - -> /// <- o - - - - - +====+ - - - - - | - - - ->

View file

@ -33,8 +33,7 @@ pub fn is_whitespace(s: &str) -> bool {
/// A "space character" according to: /// A "space character" according to:
/// ///
/// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html# /// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
/// space-character
pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[ pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[
'\u0020', '\u0020',
'\u0009', '\u0009',