Fix rustdoc fallout
This commit is contained in:
parent
7ae8889286
commit
58a8103df9
2 changed files with 16 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ pub struct Module {
|
|||
pub vis: ast::Visibility,
|
||||
pub stab: Option<attr::Stability>,
|
||||
pub impls: Vec<Impl>,
|
||||
pub def_traits: Vec<DefaultTrait>,
|
||||
pub foreigns: Vec<ast::ForeignMod>,
|
||||
pub macros: Vec<Macro>,
|
||||
pub is_crate: bool,
|
||||
|
|
@ -65,6 +66,7 @@ impl Module {
|
|||
constants : Vec::new(),
|
||||
traits : Vec::new(),
|
||||
impls : Vec::new(),
|
||||
def_traits : Vec::new(),
|
||||
foreigns : Vec::new(),
|
||||
macros : Vec::new(),
|
||||
is_crate : false,
|
||||
|
|
@ -196,6 +198,12 @@ pub struct Impl {
|
|||
pub id: ast::NodeId,
|
||||
}
|
||||
|
||||
pub struct DefaultTrait {
|
||||
pub unsafety: ast::Unsafety,
|
||||
pub trait_: ast::TraitRef,
|
||||
pub id: ast::NodeId,
|
||||
}
|
||||
|
||||
pub struct Macro {
|
||||
pub name: Ident,
|
||||
pub id: ast::NodeId,
|
||||
|
|
|
|||
|
|
@ -358,6 +358,14 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
};
|
||||
om.impls.push(i);
|
||||
},
|
||||
ast::ItemDefTrait(unsafety, ref trait_ref) => {
|
||||
let i = DefaultTrait {
|
||||
unsafety: unsafety,
|
||||
trait_: trait_ref.clone(),
|
||||
id: item.id
|
||||
};
|
||||
om.def_traits.push(i);
|
||||
}
|
||||
ast::ItemForeignMod(ref fm) => {
|
||||
om.foreigns.push(fm.clone());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue