mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviper
Stabilize `char::MIN` FCP completed https://github.com/rust-lang/rust/issues/114298#issuecomment-2335250508 Closes #114298
This commit is contained in:
commit
72b0f5b8d2
@ -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);
|
||||
@ -29,7 +28,6 @@ impl char {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(char_min)]
|
||||
/// # fn something_which_returns_char() -> char { 'a' }
|
||||
/// let c: char = something_which_returns_char();
|
||||
/// assert!(char::MIN <= c);
|
||||
@ -37,7 +35,7 @@ impl char {
|
||||
/// 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}'`.
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user