Skip to content

Commit 88cf2bf

Browse files
committed
update rustdoc
1 parent c625d2c commit 88cf2bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,12 @@ pub fn name_from_pat(p: &hir::Pat) -> String {
466466

467467
pub fn print_const(cx: &DocContext<'_>, n: &'tcx ty::Const<'_>) -> String {
468468
match n.val {
469-
ty::ConstKind::Unevaluated(def_id, _, promoted) => {
470-
let mut s = if let Some(def_id) = def_id.as_local() {
469+
ty::ConstKind::Unevaluated(def, _, promoted) => {
470+
let mut s = if let Some(def_id) = def.did.as_local() {
471471
let hir_id = cx.tcx.hir().as_local_hir_id(def_id);
472472
print_const_expr(cx, cx.tcx.hir().body_owned_by(hir_id))
473473
} else {
474-
inline::print_inlined_const(cx, def_id)
474+
inline::print_inlined_const(cx, def.did)
475475
};
476476
if let Some(promoted) = promoted {
477477
s.push_str(&format!("::{:?}", promoted))

0 commit comments

Comments
 (0)