Skip to content

Commit

Permalink
Auto merge of #57567 - Centril:stabilize-transpose, r=alexreg
Browse files Browse the repository at this point in the history
Stabilize `transpose_result` in 1.33

fixes #47338.

FCP completed: #47338 (comment)

r? @alexreg
  • Loading branch information
bors committed Jan 13, 2019
2 parents d45bef9 + 6d7a4a6 commit 1c561d9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,8 +1013,6 @@ impl<T, E> Option<Result<T, E>> {
/// # Examples
///
/// ```
/// #![feature(transpose_result)]
///
/// #[derive(Debug, Eq, PartialEq)]
/// struct SomeErr;
///
Expand All @@ -1023,7 +1021,7 @@ impl<T, E> Option<Result<T, E>> {
/// assert_eq!(x, y.transpose());
/// ```
#[inline]
#[unstable(feature = "transpose_result", issue = "47338")]
#[stable(feature = "transpose_result", since = "1.33.0")]
pub fn transpose(self) -> Result<Option<T>, E> {
match self {
Some(Ok(x)) => Ok(Some(x)),
Expand Down
4 changes: 1 addition & 3 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,6 @@ impl<T, E> Result<Option<T>, E> {
/// # Examples
///
/// ```
/// #![feature(transpose_result)]
///
/// #[derive(Debug, Eq, PartialEq)]
/// struct SomeErr;
///
Expand All @@ -982,7 +980,7 @@ impl<T, E> Result<Option<T>, E> {
/// assert_eq!(x.transpose(), y);
/// ```
#[inline]
#[unstable(feature = "transpose_result", issue = "47338")]
#[stable(feature = "transpose_result", since = "1.33.0")]
pub fn transpose(self) -> Option<Result<T, E>> {
match self {
Ok(Some(x)) => Some(Ok(x)),
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
#![feature(test)]
#![feature(in_band_lifetimes)]
#![feature(crate_visibility_modifier)]
#![feature(transpose_result)]

#![recursion_limit="512"]

Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/result-opt-conversions.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(transpose_result)]

#[derive(Copy, Clone, Debug, PartialEq)]
struct BadNumErr;

Expand Down

0 comments on commit 1c561d9

Please sign in to comment.