make unevaluated const substs optional
This commit is contained in:
parent
f4b606fd17
commit
bfaf13af4e
46 changed files with 234 additions and 188 deletions
|
@ -287,7 +287,7 @@ crate fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
|
|||
|
||||
crate fn print_const(cx: &DocContext<'_>, n: &'tcx ty::Const<'_>) -> String {
|
||||
match n.val {
|
||||
ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs: _, promoted }) => {
|
||||
ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs_: _, promoted }) => {
|
||||
let mut s = if let Some(def) = def.as_local() {
|
||||
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def.did);
|
||||
print_const_expr(cx.tcx, cx.tcx.hir().body_owned_by(hir_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue