]> git.lizzy.rs Git - rust.git/commitdiff
Fix panic when using debug
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 17 Jun 2016 10:33:55 +0000 (12:33 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 17 Jun 2016 10:33:55 +0000 (12:33 +0200)
src/libsyntax/print/pprust.rs

index 0c90e102f3425c10c53b4dbb3bc281cd08001bb6..e2c1b3fc45ba8e003831ecf42f1754e21f1aa80c 100644 (file)
@@ -1031,7 +1031,7 @@ pub fn print_type(&mut self, ty: &ast::Ty) -> io::Result<()> {
                 try!(word(&mut self.s, "_"));
             }
             ast::TyKind::ImplicitSelf => {
-                unreachable!();
+                try!(word(&mut self.s, "Self"));
             }
             ast::TyKind::Mac(ref m) => {
                 try!(self.print_mac(m, token::Paren));