Skip to content

Commit

Permalink
Stabilize Option::xor
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 5, 2019
1 parent 81eb152 commit 1fa50b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,6 @@ impl<T> Option<T> {
/// # Examples
///
/// ```
/// #![feature(option_xor)]
///
/// let x = Some(2);
/// let y: Option<u32> = None;
/// assert_eq!(x.xor(y), Some(2));
Expand All @@ -744,7 +742,7 @@ impl<T> Option<T> {
/// assert_eq!(x.xor(y), None);
/// ```
#[inline]
#[unstable(feature = "option_xor", issue = "50512")]
#[stable(feature = "option_xor", since = "1.37.0")]
pub fn xor(self, optb: Option<T>) -> Option<T> {
match (self, optb) {
(Some(a), None) => Some(a),
Expand Down

0 comments on commit 1fa50b3

Please sign in to comment.