Instead of ICEing on incorrect pattern, use delay_span_bug
This commit is contained in:
parent
33cde4aac2
commit
cc40f41ee5
3 changed files with 35 additions and 2 deletions
|
|
@ -1300,8 +1300,16 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
|
|||
}
|
||||
}
|
||||
def => {
|
||||
span_bug!(pat.span, "tuple struct pattern didn't resolve \
|
||||
to variant or struct {:?}", def);
|
||||
debug!(
|
||||
"tuple struct pattern didn't resolve to variant or struct {:?} at {:?}",
|
||||
def,
|
||||
pat.span,
|
||||
);
|
||||
self.tcx.sess.delay_span_bug(pat.span, &format!(
|
||||
"tuple struct pattern didn't resolve to variant or struct {:?}",
|
||||
def,
|
||||
));
|
||||
return Err(());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue