diff --git a/src/libcore/result.rs b/src/libcore/result.rs index a8aa250ddad..18d78520bf5 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -218,13 +218,11 @@ fn iter2(ss: [S], ts: [T], #[doc=" Unwraps a result, assuming it is an `ok(T)` - -This operation is unsafe. "] fn unwrap(-res: result) -> T unsafe { let addr = alt res { ok(x) { ptr::addr_of(x) } - err(_) { fail "option none" } + err(_) { fail "error result" } }; let liberated_value = unsafe::reinterpret_cast(*addr); unsafe::forget(res);