Auto merge of #33151 - ollie27:rustdoc_abi, r=alexcrichton
rustdoc: Cleanup ABI rendering Use a common method for rendering `extern "<abi>"`. This now consistently shows `extern fn` rather than `extern "C" fn`.
This commit is contained in:
commit
cf3970aac5
4 changed files with 43 additions and 15 deletions
|
@ -1721,7 +1721,7 @@ impl<'tcx> Clean<Type> for ty::Ty<'tcx> {
|
|||
where_predicates: Vec::new()
|
||||
},
|
||||
decl: (cx.map.local_def_id(0), &fty.sig).clean(cx),
|
||||
abi: fty.abi.to_string(),
|
||||
abi: fty.abi,
|
||||
}),
|
||||
ty::TyStruct(def, substs) |
|
||||
ty::TyEnum(def, substs) => {
|
||||
|
@ -2143,7 +2143,7 @@ pub struct BareFunctionDecl {
|
|||
pub unsafety: hir::Unsafety,
|
||||
pub generics: Generics,
|
||||
pub decl: FnDecl,
|
||||
pub abi: String,
|
||||
pub abi: Abi,
|
||||
}
|
||||
|
||||
impl Clean<BareFunctionDecl> for hir::BareFnTy {
|
||||
|
@ -2156,7 +2156,7 @@ impl Clean<BareFunctionDecl> for hir::BareFnTy {
|
|||
where_predicates: Vec::new()
|
||||
},
|
||||
decl: self.decl.clean(cx),
|
||||
abi: self.abi.to_string(),
|
||||
abi: self.abi,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue