Navigation Menu

Skip to content

Commit

Permalink
stabilize transpose_result in 1.33
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jan 13, 2019
1 parent 75a369c commit 6d7a4a6
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
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
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
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
@@ -1,5 +1,3 @@
#![feature(transpose_result)]

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

Expand Down

0 comments on commit 6d7a4a6

Please sign in to comment.