Skip to content

Commit 4e2da7c

Browse files
committed
auto merge of #15632 : masklinn/rust/patch-1, r=alexcrichton
I saw that it was bounded by `Show` but the implication is no guarantee (and had only 0.10 to test, where this behavior has been added to 0.11)
2 parents 996263a + ded48c5 commit 4e2da7c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/libcore/result.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,10 @@ impl<T, E> Result<T, E> {
536536
impl<T, E: Show> Result<T, E> {
537537
/// Unwraps a result, yielding the content of an `Ok`.
538538
///
539-
/// Fails if the value is an `Err`.
539+
/// # Failure
540+
///
541+
/// Fails if the value is an `Err`, with a custom failure message provided
542+
/// by the `Err`'s value.
540543
#[inline]
541544
pub fn unwrap(self) -> T {
542545
match self {
@@ -550,7 +553,10 @@ impl<T, E: Show> Result<T, E> {
550553
impl<T: Show, E> Result<T, E> {
551554
/// Unwraps a result, yielding the content of an `Err`.
552555
///
553-
/// Fails if the value is an `Ok`.
556+
/// # Failure
557+
///
558+
/// Fails if the value is an `Ok`, with a custom failure message provided
559+
/// by the `Ok`'s value.
554560
#[inline]
555561
pub fn unwrap_err(self) -> E {
556562
match self {

0 commit comments

Comments
 (0)