Stream: t-compiler

Topic: Fix for ICE #58638


Esteban Küber (Feb 22 2019 at 19:28, on Zulip):

https://github.com/rust-lang/rust/pull/58654 if anyone with r+ powers sees this before @oli please do so in order to quickly unblock him to research https://github.com/rust-lang/rust/issues/58634

nikomatsakis (Feb 22 2019 at 19:32, on Zulip):

@Esteban Küber to clarify, this PR isn't aiming to do the right thing per se, just to avoid an underflow?

nikomatsakis (Feb 22 2019 at 19:32, on Zulip):

cause it's not obviously right to me :)

Esteban Küber (Feb 22 2019 at 19:39, on Zulip):

It's only to stop the ICE from happening. The proper fix will be to rework the way the "unclosed angle brackets count" is kept and reset

Esteban Küber (Feb 22 2019 at 19:40, on Zulip):

I believe the problem is because there's a reset when changing from one parse scope to another, and currently it never recovers the previous count

Esteban Küber (Feb 22 2019 at 19:41, on Zulip):

the only reason this isn't a problem with debug assertions off, is because as long as all the angle bracket count is accounted for which won't emit any errors, the count will be undeflowed and will be an arbitrarily big number

Esteban Küber (Feb 22 2019 at 19:42, on Zulip):

You could have a case where the angle bracket count is mismatched and the error suggests removing 32K opening brackets, but that would be "unlikely" to happen

Esteban Küber (Feb 22 2019 at 19:43, on Zulip):

by changing it this way, it devolves to the prior behavior of only complaining about incorrect token with no suggestions, which I believe is reasonable.

Esteban Küber (Feb 22 2019 at 19:43, on Zulip):

@nikomatsakis ^

nikomatsakis (Feb 22 2019 at 19:45, on Zulip):

PL

nikomatsakis (Feb 22 2019 at 19:45, on Zulip):

OK

Last update: Nov 20 2019 at 02:35UTC