From fe3634038ca0a7993d06ec08426f1654cb018bd9 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 16:45:46 +0100 Subject: [PATCH] Un-blacklist the layout crate from rustdoc. See #2924. Whatever rustdoc bug we used to hit was solved by the Rust upgrade. (The style crate still causes rustdoc to overflow its stack.) Also use Markdown tables rather than ASCII diagrams in inlines.rs. Not only does this look nicer, this works around rustdoc trying (and failing) to parse them as Rust code. --- mk/doc.mk | 2 +- src/components/layout/inline.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mk/doc.mk b/mk/doc.mk index 20648070e0d..4fe35efe8ea 100644 --- a/mk/doc.mk +++ b/mk/doc.mk @@ -3,7 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # FIXME(#2924) These crates make rustdoc fail for undetermined reasons. -DOC_BLACKLISTED := style layout +DOC_BLACKLISTED := style define DEF_DOC_RULES .PHONY: doc-$(1) diff --git a/src/components/layout/inline.rs b/src/components/layout/inline.rs index cd279d172cd..311b9580275 100644 --- a/src/components/layout/inline.rs +++ b/src/components/layout/inline.rs @@ -71,7 +71,7 @@ pub struct Line { /// I like truffles, yes I do. /// ~~~ /// - /// ~~~ + /// ~~~text /// +------------+ /// | I like | /// | truffles, | @@ -84,11 +84,11 @@ pub struct Line { /// /// The ranges that describe these lines would be: /// - /// ~~~ + /// /// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) | /// |------------|-------------|-------------|------------| /// | 'I like' | 'truffles,' | ' yes' | 'I do.' | - /// ~~~ pub range: Range, /// The bounds are the exact position and extents of the line with respect /// to the parent box. @@ -101,7 +101,7 @@ pub struct Line { /// /// ...the bounds would be: /// - /// ~~~ + /// ~~~text /// +-----------------------------------------------------------+ /// | ^ | /// | | | @@ -123,7 +123,7 @@ pub struct Line { /// The green zone is the greatest extent from wich a line can extend to /// before it collides with a float. /// - /// ~~~ + /// ~~~text /// +-----------------------+ /// |::::::::::::::::: | /// |:::::::::::::::::FFFFFF| @@ -164,11 +164,11 @@ pub struct LineIndices { /// /// The fragments would be indexed as follows: /// - /// ~~~ - /// | 0 | 1 | 2 | 3 | - /// |------|------------------|-------|--------------| - /// | 'I ' | 'like truffles,' | | ' yes I do.' | - /// ~~~ + /// + /// | 0 | 1 | 2 | 3 | + /// |------|------------------|---------|--------------| + /// | 'I ' | 'like truffles,' | `` | ' yes I do.' | pub fragment_index: FragmentIndex, /// The index of a character in a DOM fragment. Continuous runs of whitespace /// are treated as single characters. Non-breakable DOM fragments such as @@ -182,15 +182,15 @@ pub struct LineIndices { /// /// The characters would be indexed as follows: /// - /// ~~~ + /// /// | 0 | 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | /// |---|---|---|---|---|---|---|---|---|---|---|---|----|----|----|----|----| /// | I | | l | i | k | e | | t | r | u | f | f | l | e | s | , | | /// - /// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | - /// |-------|---|---|---|---|---|---|---|---|---|---| - /// | | | y | e | s | | I | | d | o | . | - /// ~~~ + /// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | + /// |---------|---|---|---|---|---|---|---|---|---|---| + /// | `` | | y | e | s | | I | | d | o | . | pub char_index: CharIndex, }