1
Fork 0

librustc_middle: return LocalDefId instead of DefId in body_owner_def_id

This commit is contained in:
marmeladema 2020-04-08 14:53:06 +01:00
parent 1dc363bce1
commit f62c6e1c76
13 changed files with 30 additions and 32 deletions

View file

@ -419,7 +419,10 @@ impl Clean<Lifetime> for hir::GenericParam<'_> {
impl Clean<Constant> for hir::ConstArg {
fn clean(&self, cx: &DocContext<'_>) -> Constant {
Constant {
type_: cx.tcx.type_of(cx.tcx.hir().body_owner_def_id(self.value.body)).clean(cx),
type_: cx
.tcx
.type_of(cx.tcx.hir().body_owner_def_id(self.value.body).to_def_id())
.clean(cx),
expr: print_const_expr(cx, self.value.body),
value: None,
is_literal: is_literal_expr(cx, self.value.body.hir_id),