You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace fail invocations with ice_condition.raise in rustc #1928
We should see if conditions can suit our purposes; we may not be able to get rid of every fail! invocation that rustc 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 or session.span_bug instead of fail because that prints out proper error messages.
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.
The documentation in the comment above "pub fn monitor" in rustc.rc was quite helpful for me to get my head around our current setup.
brson says we can probably close this, as "its probably not worth the effort to expunge all calls to fail! at this point"; however, marijnh's comment makes me pause before closing. Perhaps this represents some sort of weakness, if there really is not a way to make at least a best-effort attempt to extract the string passed to fail! (if any) from the parent task of the failing subtask...
Activity
brson commentedon Mar 5, 2012
Or, if it's a real error condition of course it should use
fatalorerrormarijnh commentedon Mar 6, 2012
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.
brson commentedon Mar 6, 2012
I'm inclined to agree. We need failure and logging to be more powerful.
catamorphism commentedon Mar 8, 2012
Is it reasonable to consider this bug "postponed until error/logging infrastructure improves"?
pnkfelix commentedon Apr 23, 2013
graydon commentedon Apr 24, 2013
This is an ideal candidate for conditions.
Issue rust-lang#1928 checkpoint: add ice condition and switch existin…
pnkfelix commentedon May 6, 2013
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.)
pnkfelix commentedon Jun 3, 2013
Note that some issues with conditions may need to be resolved first; e.g. #5446.
thestinger commentedon Aug 5, 2013
This is still an open issue.
catamorphism commentedon Oct 24, 2013
Low, not 1.0. (Can be closed if we remove conditions.)
alexcrichton commentedon Mar 6, 2014
Conditions have been removed.
Update dependencies (rust-lang#1928)
Merge pull request rust-lang#1928 from sayantn/use-intrinsics
Merge pull request rust-lang#1931 from sayantn/use-intrinsics
Merge pull request rust-lang#1928 from sayantn/use-intrinsics
Merge pull request rust-lang#1931 from sayantn/use-intrinsics
Merge rust-lang#1928
Auto merge of rust-lang#1928 - RalfJung:fn-abi, r=RalfJung