Uh oh!
There was an error while loading. Please reload this page.
Accept TyError in patterns to avoid ICE on bad input - #51696
Conversation
rust-highfive
commented
Jun 22, 2018
(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. |
estebank
commented
Jun 22, 2018
@bors r=oli-obk rollup |
bors
commented
Jun 22, 2018
📌 Commit fe5710a has been approved by |
bors
commented
Jun 23, 2018
Accept `TyError` in patterns to avoid ICE on bad input Fix#50585.
bors
commented
Jun 23, 2018
☀️ Test successful - status-appveyor, status-travis |
Don't ICE when performing `lower_pattern_unadjusted` on a `TyError` Fixrust-lang#50577. CC rust-lang#51696. r? @oli-obk
Fix#50585.