mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #118361 - Dylan-DPC:80626/stab/bound-map, r=Amanieu
stabilise bound_map Closes https://github.com/rust-lang/rust/issues/86026
This commit is contained in:
commit
304a17a475
@ -710,7 +710,6 @@ impl<T> Bound<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(bound_map)]
|
||||
/// use std::ops::Bound::*;
|
||||
///
|
||||
/// let bound_string = Included("Hello, World!");
|
||||
@ -719,7 +718,6 @@ impl<T> Bound<T> {
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(bound_map)]
|
||||
/// use std::ops::Bound;
|
||||
/// use Bound::*;
|
||||
///
|
||||
@ -728,7 +726,7 @@ impl<T> Bound<T> {
|
||||
/// assert_eq!(unbounded_string.map(|s| s.len()), Unbounded);
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "bound_map", issue = "86026")]
|
||||
#[stable(feature = "bound_map", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Bound<U> {
|
||||
match self {
|
||||
Unbounded => Unbounded,
|
||||
|
Loading…
Reference in New Issue
Block a user