提交 646015ca 编写于 作者: B bors 提交者: GitHub

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`.
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册