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
@ -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…
x
Reference in New Issue
Block a user