rustdoc: Create an item tag to hold doc for all item types
This commit is contained in:
parent
2740a6b605
commit
bfd8a14065
@ -6,12 +6,21 @@ type cratedoc = ~{
|
||||
topmod: moddoc,
|
||||
};
|
||||
|
||||
enum itemtag {
|
||||
modtag(moddoc),
|
||||
consttag(constdoc),
|
||||
fntag(fndoc),
|
||||
enumtag(enumdoc),
|
||||
restag(resdoc)
|
||||
}
|
||||
|
||||
type moddoc = ~{
|
||||
id: ast_id,
|
||||
name: str,
|
||||
path: [str],
|
||||
brief: option<str>,
|
||||
desc: option<str>,
|
||||
items: [itemtag],
|
||||
mods: modlist,
|
||||
fns: fnlist,
|
||||
consts: constlist,
|
||||
|
@ -43,6 +43,7 @@ fn moddoc_from_mod(
|
||||
path: [],
|
||||
brief: none,
|
||||
desc: none,
|
||||
items: [],
|
||||
mods: doc::modlist(
|
||||
vec::filter_map(module.items) {|item|
|
||||
alt item.node {
|
||||
|
@ -49,6 +49,7 @@ fn test_run_passes() {
|
||||
path: [],
|
||||
brief: none,
|
||||
desc: none,
|
||||
items: [],
|
||||
mods: doc::modlist([]),
|
||||
fns: doc::fnlist([]),
|
||||
consts: doc::constlist([]),
|
||||
@ -68,6 +69,7 @@ fn test_run_passes() {
|
||||
path: [],
|
||||
brief: none,
|
||||
desc: none,
|
||||
items: [],
|
||||
mods: doc::modlist([]),
|
||||
fns: doc::fnlist([]),
|
||||
consts: doc::constlist([]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user