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:
Matthias Krüger 2024-01-16 17:55:21 +01:00 committed by GitHub
commit 304a17a475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,