Skip to content

Commit

Permalink
Stabilize char::MIN
Browse files Browse the repository at this point in the history
  • Loading branch information
okaneco committed Sep 9, 2024
1 parent 2582bbb commit 2bc7f6c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions 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 2bc7f6c

Please # to comment.