Remove Ty prefix from Ty{Foreign|Param}
This commit is contained in:
parent
6f637da50c
commit
04fa5d3adb
68 changed files with 160 additions and 160 deletions
|
|
@ -83,7 +83,7 @@ pub fn try_inline(cx: &DocContext, def: Def, name: ast::Name, visited: &mut FxHa
|
|||
ret.extend(build_impls(cx, did, true));
|
||||
clean::EnumItem(build_enum(cx, did))
|
||||
}
|
||||
Def::TyForeign(did) => {
|
||||
Def::Foreign(did) => {
|
||||
record_extern_fqn(cx, did, clean::TypeKind::Foreign);
|
||||
ret.extend(build_impls(cx, did, false));
|
||||
clean::ForeignTypeItem
|
||||
|
|
|
|||
|
|
@ -2411,7 +2411,7 @@ impl Clean<Type> for hir::Ty {
|
|||
return new_ty;
|
||||
}
|
||||
|
||||
if let Def::TyParam(did) = path.def {
|
||||
if let Def::Param(did) = path.def {
|
||||
if let Some(bounds) = cx.impl_trait_bounds.borrow_mut().remove(&did) {
|
||||
return ImplTrait(bounds);
|
||||
}
|
||||
|
|
@ -2460,7 +2460,7 @@ impl Clean<Type> for hir::Ty {
|
|||
}
|
||||
hir::GenericParamKind::Type { ref default, .. } => {
|
||||
let ty_param_def =
|
||||
Def::TyParam(cx.tcx.hir.local_def_id(param.id));
|
||||
Def::Param(cx.tcx.hir.local_def_id(param.id));
|
||||
let mut j = 0;
|
||||
let type_ = generic_args.args.iter().find_map(|arg| {
|
||||
match arg {
|
||||
|
|
@ -2602,7 +2602,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
|
|||
is_generic: false,
|
||||
}
|
||||
}
|
||||
ty::TyForeign(did) => {
|
||||
ty::Foreign(did) => {
|
||||
inline::record_extern_fqn(cx, did, TypeKind::Foreign);
|
||||
let path = external_path(cx, &cx.tcx.item_name(did).as_str(),
|
||||
None, false, vec![], Substs::empty());
|
||||
|
|
@ -2661,7 +2661,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
|
|||
|
||||
ty::Projection(ref data) => data.clean(cx),
|
||||
|
||||
ty::TyParam(ref p) => Generic(p.name.to_string()),
|
||||
ty::Param(ref p) => Generic(p.name.to_string()),
|
||||
|
||||
ty::Anon(def_id, substs) => {
|
||||
// Grab the "TraitA + TraitB" from `impl TraitA + TraitB`,
|
||||
|
|
@ -3710,10 +3710,10 @@ fn resolve_type(cx: &DocContext,
|
|||
Def::SelfTy(..) if path.segments.len() == 1 => {
|
||||
return Generic(keywords::SelfType.name().to_string());
|
||||
}
|
||||
Def::TyParam(..) if path.segments.len() == 1 => {
|
||||
Def::Param(..) if path.segments.len() == 1 => {
|
||||
return Generic(format!("{:#}", path));
|
||||
}
|
||||
Def::SelfTy(..) | Def::TyParam(..) | Def::AssociatedTy(..) => true,
|
||||
Def::SelfTy(..) | Def::Param(..) | Def::AssociatedTy(..) => true,
|
||||
_ => false,
|
||||
};
|
||||
let did = register_def(&*cx, path.def);
|
||||
|
|
@ -3731,7 +3731,7 @@ pub fn register_def(cx: &DocContext, def: Def) -> DefId {
|
|||
Def::Struct(i) => (i, TypeKind::Struct),
|
||||
Def::Union(i) => (i, TypeKind::Union),
|
||||
Def::Mod(i) => (i, TypeKind::Module),
|
||||
Def::TyForeign(i) => (i, TypeKind::Foreign),
|
||||
Def::Foreign(i) => (i, TypeKind::Foreign),
|
||||
Def::Const(i) => (i, TypeKind::Const),
|
||||
Def::Static(i, _) => (i, TypeKind::Static),
|
||||
Def::Variant(i) => (cx.tcx.parent_def_id(i).expect("cannot get parent def id"),
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> DocContext<'a, 'tcx, 'rcx, 'cstore> {
|
|||
None,
|
||||
P(hir::Path {
|
||||
span: DUMMY_SP,
|
||||
def: Def::TyParam(param.def_id),
|
||||
def: Def::Param(param.def_id),
|
||||
segments: HirVec::from_vec(vec![
|
||||
hir::PathSegment::from_ident(Ident::from_interned_str(param.name))
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> RustdocVisitor<'a, 'tcx, 'rcx, 'cstore> {
|
|||
Def::Struct(did) |
|
||||
Def::Union(did) |
|
||||
Def::Enum(did) |
|
||||
Def::TyForeign(did) |
|
||||
Def::Foreign(did) |
|
||||
Def::TyAlias(did) if !self_is_hidden => {
|
||||
self.cx.access_levels.borrow_mut().map.insert(did, AccessLevel::Public);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue