Doc block ignored for pub extern crate
Looks like doc blocks for pub extern crate are ignored and don't show up anywhere in the generated documents.
So, this code
/// Unicode Character Database.
pub extern crate unic_ucd as ucd;
/// Unicode Bidirectional Algorithm (USA\#9).
pub extern crate unic_bidi as bidi;
/// Unicode Normalization Forms (USA\#15).
pub extern crate unic_normal as normal;
/// Unicode IDNA Compatibility Processing (UTS\#46).
pub extern crate unic_idna as idna;
Results in this output: <img width="429" alt="screen shot 2017-06-21 at 2 18 10 pm" src="https://user-images.githubusercontent.com/37169/27404767-7a3c30c0-568c-11e7-9c4c-99562a27947f.png">
I believe it's not intentional and just a missing feature because of the (kind of) new pub extern crate syntax. Is that correct?
On a related topic, having
missing_docs, I don't get any lint errors for a doc-lesspub extern crate. Not sure how intentional is this one, though.Behnam Esfahbod at 2017-06-21 20:21:54
Indeed. Taking a look.
Guillaume Gomez at 2017-06-29 19:54:12
Here's a hunch based on what i've seen around...
The place where
pub extern cratelines are printed is this spot initem_module. My hunch is that if you calldocument(w, cx, myitem)?;there you'll get the full documentation for that item. This may or may not be a good thing since it'll just spill the entire docblock there. On the other hand, sincepub extern crates don't get their own page, this is the next best place to put it.I imagine
missing_docsdoesn't fire for these since it's a re-export and those things don't fall under that lint - i mean, right now it doesn't print those docs anywhere, so it'd be worthless to lint on those. Revisiting that lint after this gets updated may be worth doing, but it also runs into stability problems.QuietMisdreavus at 2017-09-29 01:17:58