about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChai T. Rex <ChaiTRex@users.noreply.github.com>2025-07-04 23:32:58 -0400
committerChai T. Rex <ChaiTRex@users.noreply.github.com>2025-08-05 15:03:11 -0400
commitd811581ba7b8f577b537d33446856eb6c6ad41fa (patch)
tree4dd27d1a9a869737dc145bf8fb22238bcd8b42ca
parent9a1d38047fe367c32685b07a9ac41da4675b892d (diff)
downloadrust-d811581ba7b8f577b537d33446856eb6c6ad41fa.tar.gz
rust-d811581ba7b8f577b537d33446856eb6c6ad41fa.zip
Add `std::ascii::Char` `MIN` and `MAX` constants
-rw-r--r--library/core/src/ascii/ascii_char.rs8
1 files changed, 8 insertions, 0 deletions
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")]