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`.
This commit is contained in:
commit
646015cae4
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue