diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-01-13 14:01:27 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-01-14 16:35:14 -0500 |
| commit | b92ec6a78a980b567ec8e6c034e3b37caea81aaa (patch) | |
| tree | ed3091df9cc2e4d05982d68f212490be0bb064b4 /src | |
| parent | 02aacaba8f7584ee334303840ad88fcd513e3f13 (diff) | |
| download | rust-b92ec6a78a980b567ec8e6c034e3b37caea81aaa.tar.gz rust-b92ec6a78a980b567ec8e6c034e3b37caea81aaa.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/util/ppaux.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 559ec533baa..c3b6c2178ee 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -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)) } |
