-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace fail invocations with ice_condition.raise in rustc #1928
Comments
Or, if it's a real error condition of course it should use |
I really think we should wire things up in a way that allows us to print out the error message from normal failure. Passing sessions to things that otherwise don't take sessions, just to be able to call session.bug, doesn't sound attractive. Not to mention that we're also calling library routines that can fail. |
I'm inclined to agree. We need failure and logging to be more powerful. |
Is it reasonable to consider this bug "postponed until error/logging infrastructure improves"? |
|
This is an ideal candidate for conditions. |
…g fails in rustc to use it.
I've got a sketch started over here: https://github.com/pnkfelix/rust/commits/issue1928-add-ice-condition (Most of the redundancies that I identified while doing it come from known problems in our macro and condition system.) |
Note that some issues with conditions may need to be resolved first; e.g. #5446. |
This is still an open issue. |
Low, not 1.0. (Can be closed if we remove conditions.) |
Conditions have been removed. |
Co-authored-by: Ted Kaminski <tedinski@amazon.com>
We should see if conditions can suit our purposes; we may not be able to get rid of every
fail!
invocation thatrustc
can reach, but it would not hurt to try.Original title: Replace fail with session.bug in rustc
When possible rustc should be using
session.bug
orsession.span_bug
instead offail
because that prints out proper error messages.The text was updated successfully, but these errors were encountered: