7828c3dd28
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change] |
||
---|---|---|
.. | ||
args-fail.rs | ||
assert-as-macro.rs | ||
assert-eq-macro-fail.rs | ||
assert-macro-explicit.rs | ||
assert-macro-fmt.rs | ||
assert-macro-owned.rs | ||
assert-macro-static.rs | ||
binop-fail.rs | ||
bounds-check-no-overflow.rs | ||
bug-811.rs | ||
bug-2470-bounds-check-overflow-2.rs | ||
bug-2470-bounds-check-overflow-3.rs | ||
bug-2470-bounds-check-overflow.rs | ||
by-value-self-objects-fail.rs | ||
die-macro-expr.rs | ||
die-macro-pure.rs | ||
die-macro.rs | ||
divide-by-zero.rs | ||
doublefail.rs | ||
dst-raw-slice.rs | ||
explicit-fail-msg.rs | ||
explicit-fail.rs | ||
expr-fn-fail.rs | ||
expr-if-fail-fn.rs | ||
expr-if-fail.rs | ||
expr-match-fail-fn.rs | ||
expr-match-fail.rs | ||
extern-fail.rs | ||
fail-arg.rs | ||
fail-macro-any-wrapped.rs | ||
fail-macro-any.rs | ||
fail-macro-explicit.rs | ||
fail-macro-fmt.rs | ||
fail-macro-owned.rs | ||
fail-macro-static.rs | ||
fail-main.rs | ||
fail-non-utf8.rs | ||
fail-parens.rs | ||
fail-task-name-none.rs | ||
fail-task-name-owned.rs | ||
fail-task-name-send-str.rs | ||
fail-task-name-static.rs | ||
fail.rs | ||
fmt-fail.rs | ||
for-each-loop-fail.rs | ||
glob-use-std.rs | ||
hashmap-capacity-overflow.rs | ||
if-check-fail.rs | ||
if-cond-bot.rs | ||
issue-948.rs | ||
issue-2061.rs | ||
issue-2444.rs | ||
issue-2761.rs | ||
issue-3029.rs | ||
issue-12920.rs | ||
issue-13202.rs | ||
main-fail.rs | ||
match-bot-fail.rs | ||
match-disc-bot.rs | ||
match-wildcards.rs | ||
mod-zero.rs | ||
native-failure.rs | ||
result-get-fail.rs | ||
rhs-type.rs | ||
rt-set-exit-status-fail2.rs | ||
rt-set-exit-status-fail.rs | ||
rt-set-exit-status.rs | ||
run-unexported-tests.rs | ||
str-overrun.rs | ||
task-spawn-barefn.rs | ||
test-fail.rs | ||
test-tasks-invalid-value.rs | ||
tls-exit-status.rs | ||
too-much-recursion-unwinding.rs | ||
unimplemented-macro-fail.rs | ||
unique-fail.rs | ||
unreachable-macro-fail.rs | ||
unwind-interleaved.rs | ||
unwind-rec2.rs | ||
unwind-rec.rs | ||
unwind-unique.rs | ||
vec-overrun.rs | ||
while-body-fails.rs | ||
while-fail.rs |