Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit removes all usage of conditions from the runtime and I/O
implementation. The new idea is to return IoResult which is a typedef on
Result<T, IoError>. The error portion of this may wish to change in the future,
but for now it's a good step forward to remove conditions.
Some notable changes:
if_ok!
/seq!
macros -- right now these are only defined in libstd, but they're definitely in the wrong spot and may belong in the core-macro injection as well.This is not quite ready for merging just yet. I'd like to get some feedback on this before cleaning this up for a true merge. I don't like how errors are default not-fatal any more, but the code isn't really that much less readable in my opinion. There's also not a lot of heavy I/O code except for rustdoc which just ignores all errors, so this perhaps isn't the best showcase of conversion.
I'm mainly soliciting for feedback about this. I think that this is the right way to go in general (moving away from conditions), but if there are any reservations about the specifics we should probably discuss them now.