diff options
| author | bors <bors@rust-lang.org> | 2016-06-17 15:33:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-17 15:33:00 -0700 |
| commit | 646015cae40722a06f9b2ed44d4b3e8bdebcc122 (patch) | |
| tree | a3c94df51b60e1d3e76a0533d2eb14cdb8935ce8 /src/libsyntax | |
| parent | 1f9423a87aadacf1dc8f52e3df56f61a7415d4d7 (diff) | |
| parent | 9ac3d9b63ccddc14d3ffbc9d53a8c5864ad68a17 (diff) | |
| download | rust-646015cae40722a06f9b2ed44d4b3e8bdebcc122.tar.gz rust-646015cae40722a06f9b2ed44d4b3e8bdebcc122.zip | |
Auto merge of #34323 - GuillaumeGomez:unreachable_not_unreachable, r=pnkfelix
Fix panic when using debug in rustc
When I was using `println!("{:?}")` [here](https://github.com/rust-lang/rust/blob/master/src/librustc_resolve/lib.rs#L1610) and [here](https://github.com/rust-lang/rust/blob/master/src/librustc_typeck/collect.rs#L836), I was able to get into this `unreachache`.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 0c90e102f34..e2c1b3fc45b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1031,7 +1031,7 @@ impl<'a> State<'a> { 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)); |
