Accept TyError in patterns to avoid ICE on bad input#51696
Accept TyError in patterns to avoid ICE on bad input#51696bors merged 1 commit intorust-lang:masterfrom
TyError in patterns to avoid ICE on bad input#51696Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
| @@ -505,7 +505,16 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> { | |||
| let def = self.tables.qpath_def(qpath, pat.hir_id); | |||
There was a problem hiding this comment.
I think it might be less fragile to check at the assignment of the tables field, whether tables.tainted_by_errors is true and then just not recurse.
There was a problem hiding this comment.
There was a problem hiding this comment.
Hmm no. You're right. your original thing seemed better. I thought we could check before calling from_hir or new, but I just checked and that seems messy.
r=me with your original thing
This comment has been minimized.
This comment has been minimized.
|
There's a discrepancy in regular output and The warning appears only in the latter. This is true in current stable too. |
|
@bors r=oli-obk rollup |
|
📌 Commit fe5710a has been approved by |
Accept `TyError` in patterns to avoid ICE on bad input Fix #50585.
|
☀️ Test successful - status-appveyor, status-travis |
Don't ICE when performing `lower_pattern_unadjusted` on a `TyError` Fix rust-lang#50577. CC rust-lang#51696. r? @oli-obk
Fix #50585.