Skip to content

Commit 646015c

Browse files
authored
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`.
2 parents 1f9423a + 9ac3d9b commit 646015c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/print/pprust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ impl<'a> State<'a> {
10311031
try!(word(&mut self.s, "_"));
10321032
}
10331033
ast::TyKind::ImplicitSelf => {
1034-
unreachable!();
1034+
try!(word(&mut self.s, "Self"));
10351035
}
10361036
ast::TyKind::Mac(ref m) => {
10371037
try!(self.print_mac(m, token::Paren));

0 commit comments

Comments
 (0)