X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fcore%2Fsrc%2Foption.rs;h=a81dbc6924fb737a3d9891bd7099f6f89ec7a24c;hb=d2d44f619f98383a26c1f8e4da15862d98467d4e;hp=4b57371096e9ab670f3c99e35e8220a47600c972;hpb=31d754a1dfba4d091a05589459708f286d5a231e;p=rust.git diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 4b57371096e..a81dbc6924f 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1713,8 +1713,6 @@ impl Option<(T, U)> { /// # Examples /// /// ``` - /// #![feature(unzip_option)] - /// /// let x = Some((1, "hi")); /// let y = None::<(u8, u32)>; /// @@ -1722,8 +1720,13 @@ impl Option<(T, U)> { /// assert_eq!(y.unzip(), (None, None)); /// ``` #[inline] - #[unstable(feature = "unzip_option", issue = "87800", reason = "recently added")] - pub const fn unzip(self) -> (Option, Option) { + #[stable(feature = "unzip_option", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_unstable(feature = "const_option", issue = "67441")] + pub const fn unzip(self) -> (Option, Option) + where + T: ~const Destruct, + U: ~const Destruct, + { match self { Some((a, b)) => (Some(a), Some(b)), None => (None, None),