-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(bound_copied)]
This is a tracking issue to add a Bound::copied
method.
Public API
impl<T: Copy> Bound<&T> {
/// Map a `Bound<&T>` to a `Bound<T>` by copying the contents of the bound.
///
/// # Examples
///
/// ```
/// use std::ops::Bound::*;
/// use std::ops::RangeBounds;
///
/// assert_eq!((1..12).start_bound(), Included(&1));
/// assert_eq!((1..12).start_bound().copied(), Included(1));
/// ```
#[must_use = "`self` will be dropped if the result is not used"]
#[unstable(feature = "bound_copied", issue = ???)]
pub fn copied(self) -> Bound<T> {
match self {
Bound::Unbounded => Bound::Unbounded,
Bound::Included(x) => Bound::Included(*x),
Bound::Excluded(x) => Bound::Excluded(*x),
}
}
}
Steps / History
- ACP: ACP: Add
Bound::copied
libs-team#637 - Implementation: Add
Bound::copied
#145968 - Final comment period (FCP)1
- Stabilization PR
Footnotes
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.