Closed
Description
Basically, I expect rust doc
to behave just like rustdoc
. Issue #7380 provides one example where this is not the case, but the issue here seems a bit more serious: Significant portions of the doc are not being emitted, though the files to hold them are being created (and left empty).
Context:
$ rust build --version
rustc 0.6 (e650399 2013-06-12 23:10:15 -0700)
host: x86_64-apple-darwin
$ cat play-doc.rs
#[link( name = "playdoc", vers = "1.0" )];
/// Doc for `w` mod.
pub mod w {
/// Doc for `f` fn.
pub fn f() -> int { 3 }
}
/// Doc for `whoa` fn; returns 3. (Whoa.)
pub fn whoa() -> int { 3 }
$ rm -rf foo
$ cat play-doc.rs
#[link( name = "playdoc", vers = "1.0" )];
/// Doc for `w` mod.
pub mod w {
/// Doc for `f` fn.
pub fn f() -> int { 3 }
}
/// Doc for `whoa` fn; returns 3. (Whoa.)
pub fn whoa() -> int { 3 }
Transcript showing bug (good "rustdoc" behavior first, followed by erroneous "rust doc" behavior second):
$ mkdir foo
$ rm -rf foo/* ; rustdoc play-doc.rs --output-format markdown --output-dir foo
$ ls -l foo/
total 16
-rw------- 1 fklock staff 236 Jun 25 15:43 playdoc.md
-rw------- 1 fklock staff 161 Jun 25 15:43 w.md
$ cat foo/playdoc.md
% Crate playdoc
<div class='index'>
* [Function `whoa`](#function-whoa) - Doc for `whoa` fn; returns 3
* [Module `w`](w.md) - Doc for `w` mod.
</div>
## Function `whoa`
fn whoa() -> int
Doc for `whoa` fn; returns 3. (Whoa.)
$ rm -rf foo/* ; rust doc play-doc.rs --output-format markdown --output-dir foo
$ ls -l foo/
total 8
-rw------- 1 fklock staff 0 Jun 25 15:43 playdoc.md
-rw------- 1 fklock staff 161 Jun 25 15:43 w.md
$ cat foo/playdoc.md
$