rustdoc: Implement constant documentation
At the same time, migrate statics to constants.
This commit is contained in:
parent
1bfe450a5e
commit
01d58fe2cb
9 changed files with 121 additions and 47 deletions
|
@ -30,6 +30,7 @@ pub struct Module {
|
|||
pub id: NodeId,
|
||||
pub typedefs: Vec<Typedef>,
|
||||
pub statics: Vec<Static>,
|
||||
pub constants: Vec<Constant>,
|
||||
pub traits: Vec<Trait>,
|
||||
pub vis: ast::Visibility,
|
||||
pub stab: Option<attr::Stability>,
|
||||
|
@ -56,6 +57,7 @@ impl Module {
|
|||
mods : Vec::new(),
|
||||
typedefs : Vec::new(),
|
||||
statics : Vec::new(),
|
||||
constants : Vec::new(),
|
||||
traits : Vec::new(),
|
||||
impls : Vec::new(),
|
||||
view_items : Vec::new(),
|
||||
|
@ -151,6 +153,17 @@ pub struct Static {
|
|||
pub whence: Span,
|
||||
}
|
||||
|
||||
pub struct Constant {
|
||||
pub type_: P<ast::Ty>,
|
||||
pub expr: P<ast::Expr>,
|
||||
pub name: Ident,
|
||||
pub attrs: Vec<ast::Attribute>,
|
||||
pub vis: ast::Visibility,
|
||||
pub stab: Option<attr::Stability>,
|
||||
pub id: ast::NodeId,
|
||||
pub whence: Span,
|
||||
}
|
||||
|
||||
pub struct Trait {
|
||||
pub name: Ident,
|
||||
pub items: Vec<ast::TraitItem>, //should be TraitItem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue