about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGabriel Bjørnager Jensen <gabriel@achernar.io>2024-09-22 19:54:35 +0200
committerGabriel Bjørnager Jensen <gabriel@achernar.io>2024-09-22 19:54:35 +0200
commit2daf076fd8345ea2db1a81f56e8182e5f4e94ce3 (patch)
tree7695264bfdfa6c61578b1e356298b9f723f3f086
parentbe9b3b459a0012fc83078ec4e5302b6153ceeeba (diff)
downloadrust-2daf076fd8345ea2db1a81f56e8182e5f4e94ce3.tar.gz
rust-2daf076fd8345ea2db1a81f56e8182e5f4e94ce3.zip
Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'u8' as const; Rename 'const_char_make_ascii' feature gate to 'const_make_ascii';
-rw-r--r--library/core/src/char/methods.rs4
-rw-r--r--library/core/src/num/mod.rs6
2 files changed, 6 insertions, 4 deletions
diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs
index 9d9a3b5132c..2a0acfeacdf 100644
--- a/library/core/src/char/methods.rs
+++ b/library/core/src/char/methods.rs
@@ -1277,7 +1277,7 @@ impl char {
     ///
     /// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
     #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
-    #[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
+    #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
     #[inline]
     pub const fn make_ascii_uppercase(&mut self) {
         *self = self.to_ascii_uppercase();
@@ -1303,7 +1303,7 @@ impl char {
     ///
     /// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
     #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
-    #[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
+    #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
     #[inline]
     pub const fn make_ascii_lowercase(&mut self) {
         *self = self.to_ascii_lowercase();
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs
index dca644ebef4..1f6e43bdba3 100644
--- a/library/core/src/num/mod.rs
+++ b/library/core/src/num/mod.rs
@@ -614,8 +614,9 @@ impl u8 {
     ///
     /// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
     #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
+    #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
     #[inline]
-    pub fn make_ascii_uppercase(&mut self) {
+    pub const fn make_ascii_uppercase(&mut self) {
         *self = self.to_ascii_uppercase();
     }
 
@@ -639,8 +640,9 @@ impl u8 {
     ///
     /// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
     #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
+    #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
     #[inline]
-    pub fn make_ascii_lowercase(&mut self) {
+    pub const fn make_ascii_lowercase(&mut self) {
         *self = self.to_ascii_lowercase();
     }