Skip to content

Commit

Permalink
Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviper
Browse files Browse the repository at this point in the history
Stabilize `char::MIN`

FCP completed #114298 (comment)
Closes #114298
  • Loading branch information
matthiaskrgr authored Sep 9, 2024
2 parents 7c109b1 + bc70fa2 commit 72b0f5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ impl char {
/// for you:
///
/// ```
/// #![feature(char_min)]
/// let dist = u32::from(char::MAX) - u32::from(char::MIN);
/// let size = (char::MIN..=char::MAX).count() as u32;
/// assert!(size < dist);
Expand All @@ -29,15 +28,14 @@ impl char {
/// # Examples
///
/// ```
/// #![feature(char_min)]
/// # fn something_which_returns_char() -> char { 'a' }
/// let c: char = something_which_returns_char();
/// assert!(char::MIN <= c);
///
/// let value_at_min = u32::from(char::MIN);
/// assert_eq!(char::from_u32(value_at_min), Some('\0'));
/// ```
#[unstable(feature = "char_min", issue = "114298")]
#[stable(feature = "char_min", since = "CURRENT_RUSTC_VERSION")]
pub const MIN: char = '\0';

/// The highest valid code point a `char` can have, `'\u{10FFFF}'`.
Expand All @@ -48,7 +46,6 @@ impl char {
/// for you:
///
/// ```
/// #![feature(char_min)]
/// let dist = u32::from(char::MAX) - u32::from(char::MIN);
/// let size = (char::MIN..=char::MAX).count() as u32;
/// assert!(size < dist);
Expand Down

0 comments on commit 72b0f5b

Please sign in to comment.