merge as_local_hir_id with local_def_id_to_hir_id
This commit is contained in:
@@ -471,7 +471,7 @@ pub fn print_const(cx: &DocContext<'_>, n: &'tcx ty::Const<'_>) -> String {
|
||||
match n.val {
|
||||
ty::ConstKind::Unevaluated(def, _, promoted) => {
|
||||
let mut s = if let Some(def) = def.as_local() {
|
||||
let hir_id = cx.tcx.hir().as_local_hir_id(def.did);
|
||||
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def.did);
|
||||
print_const_expr(cx, cx.tcx.hir().body_owned_by(hir_id))
|
||||
} else {
|
||||
inline::print_inlined_const(cx, def.did)
|
||||
|
||||
Reference in New Issue
Block a user