Skip to content

Commit 7c009a4

Browse files
committed
Rollup merge of #59231 - matklad:copied, r=Centril
Stabilize Option::copied closes #57126
2 parents 40d277e + 08f264d commit 7c009a4

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/libcore/option.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -881,15 +881,13 @@ impl<T: Copy> Option<&T> {
881881
/// # Examples
882882
///
883883
/// ```
884-
/// #![feature(copied)]
885-
///
886884
/// let x = 12;
887885
/// let opt_x = Some(&x);
888886
/// assert_eq!(opt_x, Some(&12));
889887
/// let copied = opt_x.copied();
890888
/// assert_eq!(copied, Some(12));
891889
/// ```
892-
#[unstable(feature = "copied", issue = "57126")]
890+
#[stable(feature = "copied", since = "1.35.0")]
893891
pub fn copied(self) -> Option<T> {
894892
self.map(|&t| t)
895893
}
@@ -902,15 +900,13 @@ impl<T: Copy> Option<&mut T> {
902900
/// # Examples
903901
///
904902
/// ```
905-
/// #![feature(copied)]
906-
///
907903
/// let mut x = 12;
908904
/// let opt_x = Some(&mut x);
909905
/// assert_eq!(opt_x, Some(&mut 12));
910906
/// let copied = opt_x.copied();
911907
/// assert_eq!(copied, Some(12));
912908
/// ```
913-
#[unstable(feature = "copied", issue = "57126")]
909+
#[stable(feature = "copied", since = "1.35.0")]
914910
pub fn copied(self) -> Option<T> {
915911
self.map(|&mut t| t)
916912
}

src/libcore/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(box_syntax)]
22
#![feature(cell_update)]
3-
#![feature(copied)]
43
#![feature(core_private_bignum)]
54
#![feature(core_private_diy_float)]
65
#![feature(dec2flt)]

0 commit comments

Comments
 (0)