rustdoc: Add enums to the doc tree
This commit is contained in:
parent
b779277dae
commit
61b5cc95d1
3 changed files with 23 additions and 4 deletions
|
@ -14,7 +14,8 @@ type moddoc = ~{
|
|||
desc: option<str>,
|
||||
mods: modlist,
|
||||
fns: fnlist,
|
||||
consts: constlist
|
||||
consts: constlist,
|
||||
enums: enumlist
|
||||
};
|
||||
|
||||
type constdoc = ~{
|
||||
|
@ -47,7 +48,22 @@ type retdoc = {
|
|||
ty: option<str>
|
||||
};
|
||||
|
||||
type enumdoc = ~{
|
||||
id: ast_id,
|
||||
name: str,
|
||||
brief: option<str>,
|
||||
desc: option<str>,
|
||||
variants: [variantdoc]
|
||||
};
|
||||
|
||||
type variantdoc = ~{
|
||||
name: str,
|
||||
desc: option<str>,
|
||||
sig: option<str>
|
||||
};
|
||||
|
||||
// Just to break the structural recursive types
|
||||
enum modlist = [moddoc];
|
||||
enum constlist = [constdoc];
|
||||
enum fnlist = [fndoc];
|
||||
enum enumlist = [enumdoc];
|
|
@ -76,7 +76,8 @@ fn moddoc_from_mod(
|
|||
none
|
||||
}
|
||||
}
|
||||
})
|
||||
}),
|
||||
enums: doc::enumlist([])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ fn test_run_passes() {
|
|||
desc: none,
|
||||
mods: doc::modlist([]),
|
||||
fns: doc::fnlist([]),
|
||||
consts: doc::constlist([])
|
||||
consts: doc::constlist([]),
|
||||
enums: doc::enumlist([])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +65,8 @@ fn test_run_passes() {
|
|||
desc: none,
|
||||
mods: doc::modlist([]),
|
||||
fns: doc::fnlist([]),
|
||||
consts: doc::constlist([])
|
||||
consts: doc::constlist([]),
|
||||
enums: doc::enumlist([])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue