Skip to content

Commit b92ec6a

Browse files
committed
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).
1 parent 02aacab commit b92ec6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/util/ppaux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ impl<'tcx> UserString<'tcx> for ty::ProjectionPredicate<'tcx> {
14301430
impl<'tcx> Repr<'tcx> for ty::ProjectionTy<'tcx> {
14311431
fn repr(&self, tcx: &ctxt<'tcx>) -> String {
14321432
format!("<{} as {}>::{}",
1433-
self.trait_ref.self_ty().repr(tcx),
1433+
self.trait_ref.substs.self_ty().repr(tcx),
14341434
self.trait_ref.repr(tcx),
14351435
self.item_name.repr(tcx))
14361436
}

0 commit comments

Comments
 (0)