Skip to content

Commit 051d591

Browse files
authored
Rollup merge of rust-lang#92483 - ksqsf:master, r=dtolnay
Stabilize `result_cloned` and `result_copied` Tracking issue: rust-lang#63168 The FCP is now completed.
2 parents bf9546c + 1c547f4 commit 051d591

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

library/core/src/result.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1504,14 +1504,14 @@ impl<T, E> Result<&T, E> {
15041504
/// # Examples
15051505
///
15061506
/// ```
1507-
/// #![feature(result_copied)]
15081507
/// let val = 12;
15091508
/// let x: Result<&i32, i32> = Ok(&val);
15101509
/// assert_eq!(x, Ok(&12));
15111510
/// let copied = x.copied();
15121511
/// assert_eq!(copied, Ok(12));
15131512
/// ```
1514-
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
1513+
#[inline]
1514+
#[stable(feature = "result_copied", since = "1.59.0")]
15151515
pub fn copied(self) -> Result<T, E>
15161516
where
15171517
T: Copy,
@@ -1525,14 +1525,14 @@ impl<T, E> Result<&T, E> {
15251525
/// # Examples
15261526
///
15271527
/// ```
1528-
/// #![feature(result_cloned)]
15291528
/// let val = 12;
15301529
/// let x: Result<&i32, i32> = Ok(&val);
15311530
/// assert_eq!(x, Ok(&12));
15321531
/// let cloned = x.cloned();
15331532
/// assert_eq!(cloned, Ok(12));
15341533
/// ```
1535-
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
1534+
#[inline]
1535+
#[stable(feature = "result_cloned", since = "1.59.0")]
15361536
pub fn cloned(self) -> Result<T, E>
15371537
where
15381538
T: Clone,
@@ -1548,14 +1548,14 @@ impl<T, E> Result<&mut T, E> {
15481548
/// # Examples
15491549
///
15501550
/// ```
1551-
/// #![feature(result_copied)]
15521551
/// let mut val = 12;
15531552
/// let x: Result<&mut i32, i32> = Ok(&mut val);
15541553
/// assert_eq!(x, Ok(&mut 12));
15551554
/// let copied = x.copied();
15561555
/// assert_eq!(copied, Ok(12));
15571556
/// ```
1558-
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
1557+
#[inline]
1558+
#[stable(feature = "result_copied", since = "1.59.0")]
15591559
pub fn copied(self) -> Result<T, E>
15601560
where
15611561
T: Copy,
@@ -1569,14 +1569,14 @@ impl<T, E> Result<&mut T, E> {
15691569
/// # Examples
15701570
///
15711571
/// ```
1572-
/// #![feature(result_cloned)]
15731572
/// let mut val = 12;
15741573
/// let x: Result<&mut i32, i32> = Ok(&mut val);
15751574
/// assert_eq!(x, Ok(&mut 12));
15761575
/// let cloned = x.cloned();
15771576
/// assert_eq!(cloned, Ok(12));
15781577
/// ```
1579-
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
1578+
#[inline]
1579+
#[stable(feature = "result_cloned", since = "1.59.0")]
15801580
pub fn cloned(self) -> Result<T, E>
15811581
where
15821582
T: Clone,

0 commit comments

Comments
 (0)