1
Fork 0
This commit is contained in:
b-naber 2022-07-28 11:06:16 +02:00
parent db9a2d2fbe
commit 29c0364c37
22 changed files with 25 additions and 56 deletions

View file

@ -236,7 +236,7 @@ pub(crate) fn print_const(cx: &DocContext<'_>, n: ty::Const<'_>) -> String {
match n.kind() {
ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs: _, promoted }) => {
assert_eq!(promoted, ());
let mut s = if let Some(def) = def.as_local() {
let s = if let Some(def) = def.as_local() {
print_const_expr(cx.tcx, cx.tcx.hir().body_owned_by(def.did))
} else {
inline::print_inlined_const(cx.tcx, def.did)