Skip to content

Commit

Permalink
Print ConstKind::Placeholder just like TyKind::Placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Mar 13, 2020
1 parent 306df94 commit 6ca65bd
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/librustc/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,21 +913,7 @@ pub trait PrettyPrinter<'tcx>:
ty::ConstKind::Bound(debruijn, bound_var) => {
self.pretty_print_bound_var(debruijn, bound_var)?
}
ty::ConstKind::Placeholder(_) => {
// fallback
if print_ty {
self = self.typed_value(
|mut this| {
write!(this, "{:?}", ct.val)?;
Ok(this)
},
|this| this.print_type(ct.ty),
": ",
)?;
} else {
p!(write("{:?}", ct.val));
}
}
ty::ConstKind::Placeholder(placeholder) => p!(write("Placeholder({:?})", placeholder)),
};
Ok(self)
}
Expand Down

0 comments on commit 6ca65bd

Please sign in to comment.