Fix Repr output so that it does not ICE when a self-type is
absent. This occurs while printing object type projections for debugging (note that the `UserString` impl is much more careful about this).
This commit is contained in:
parent
02aacaba8f
commit
b92ec6a78a
1 changed files with 1 additions and 1 deletions
|
|
@ -1430,7 +1430,7 @@ impl<'tcx> UserString<'tcx> for ty::ProjectionPredicate<'tcx> {
|
|||
impl<'tcx> Repr<'tcx> for ty::ProjectionTy<'tcx> {
|
||||
fn repr(&self, tcx: &ctxt<'tcx>) -> String {
|
||||
format!("<{} as {}>::{}",
|
||||
self.trait_ref.self_ty().repr(tcx),
|
||||
self.trait_ref.substs.self_ty().repr(tcx),
|
||||
self.trait_ref.repr(tcx),
|
||||
self.item_name.repr(tcx))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue