From d811581ba7b8f577b537d33446856eb6c6ad41fa Mon Sep 17 00:00:00 2001 From: "Chai T. Rex" Date: Fri, 4 Jul 2025 23:32:58 -0400 Subject: Add `std::ascii::Char` `MIN` and `MAX` constants --- library/core/src/ascii/ascii_char.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/core/src/ascii/ascii_char.rs b/library/core/src/ascii/ascii_char.rs index bde4b92c271..419e4694594 100644 --- a/library/core/src/ascii/ascii_char.rs +++ b/library/core/src/ascii/ascii_char.rs @@ -445,6 +445,14 @@ pub enum AsciiChar { } impl AsciiChar { + /// The character with the lowest ASCII code. + #[unstable(feature = "ascii_char", issue = "110998")] + pub const MIN: Self = Self::Null; + + /// The character with the highest ASCII code. + #[unstable(feature = "ascii_char", issue = "110998")] + pub const MAX: Self = Self::Delete; + /// Creates an ASCII character from the byte `b`, /// or returns `None` if it's too large. #[unstable(feature = "ascii_char", issue = "110998")] -- cgit 1.4.1-3-g733a5