Auto merge of #68756 - JohnTitor:fix-ice-save-analysis-2, r=davidtwco
Fix ICE with save-analysis Fixes #68749 It should be fine since it's the same way as `visit_expr`.
This commit is contained in:
commit
a2e80300cd
3 changed files with 5 additions and 3 deletions
|
@ -866,8 +866,8 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
|
|||
// FIXME do something with _path?
|
||||
let hir_id = self.tcx.hir().node_to_hir_id(p.id);
|
||||
let adt = match self.save_ctxt.tables.node_type_opt(hir_id) {
|
||||
Some(ty) => ty.ty_adt_def().unwrap(),
|
||||
None => {
|
||||
Some(ty) if ty.ty_adt_def().is_some() => ty.ty_adt_def().unwrap(),
|
||||
_ => {
|
||||
visit::walk_pat(self, p);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// compile-flags: -Zsave-analysis
|
||||
|
||||
fn main() {
|
||||
match 'a' {
|
||||
char{ch} => true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0574]: expected struct, variant or union type, found builtin type `char`
|
||||
--> $DIR/issue-26459.rs:3:9
|
||||
--> $DIR/issue-26459.rs:5:9
|
||||
|
|
||||
LL | char{ch} => true
|
||||
| ^^^^ not a struct, variant or union type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue