ForeignFunctionItem(Function),
/// `static`s from an extern block
ForeignStaticItem(Static),
+ /// `type`s from an extern block
+ ForeignTypeItem,
MacroItem(Macro),
PrimitiveItem(PrimitiveType),
AssociatedConstItem(Type, Option<String>),
AssociatedTypeItem(Vec<TyParamBound>, Option<Type>),
- DefaultImplItem(DefaultImpl),
+ AutoImplItem(AutoImpl),
/// An item that has been stripped by a rustdoc pass
StrippedItem(Box<ItemEnum>),
}
Trait,
Variant,
Typedef,
+ Foreign,
}
pub trait GetDefId {
}
}
TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
- TyImplTrait(ref bounds) => ImplTrait(bounds.clean(cx)),
+ TyImplTraitExistential(ref exist_ty, ref _lts) => ImplTrait(exist_ty.bounds.clean(cx)),
+ TyImplTraitUniversal(_, ref bounds) => ImplTrait(bounds.clean(cx)),
TyInfer | TyErr => Infer,
TyTypeof(..) => panic!("Unimplemented type {:?}", self.node),
}
is_generic: false,
}
}
+ ty::TyForeign(did) => {
+ inline::record_extern_fqn(cx, did, TypeKind::Foreign);
+ let path = external_path(cx, &cx.tcx.item_name(did),
+ None, false, vec![], Substs::empty());
+ ResolvedPath {
+ path: path,
+ typarams: None,
+ did: did,
+ is_generic: false,
+ }
+ }
ty::TyDynamic(ref obj, ref reg) => {
if let Some(principal) = obj.principal() {
let did = principal.def_id();
}
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub struct DefaultImpl {
+pub struct AutoImpl {
pub unsafety: hir::Unsafety,
pub trait_: Type,
}
-impl Clean<Item> for doctree::DefaultImpl {
+impl Clean<Item> for doctree::AutoImpl {
fn clean(&self, cx: &DocContext) -> Item {
Item {
name: None,
visibility: Some(Public),
stability: None,
deprecation: None,
- inner: DefaultImplItem(DefaultImpl {
+ inner: AutoImplItem(AutoImpl {
unsafety: self.unsafety,
trait_: self.trait_.clean(cx),
}),
expr: "".to_string(),
})
}
+ hir::ForeignItemType => {
+ ForeignTypeItem
+ }
};
Item {
name: Some(self.name.clean(cx)),