From c4ffa4f945ffbaa02d40755ed5d30924cce402ad Mon Sep 17 00:00:00 2001 From: Thijs Raymakers Date: Wed, 30 Dec 2020 14:24:55 +0100 Subject: [PATCH] Remove const for escape_default and escape_unicode --- library/core/src/char/methods.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index afca28a1f2fa0..c7603b7920285 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -390,9 +390,8 @@ impl char { /// assert_eq!('❤'.escape_unicode().to_string(), "\\u{2764}"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_char_escape_unicode", since = "1.50.0")] #[inline] - pub const fn escape_unicode(self) -> EscapeUnicode { + pub fn escape_unicode(self) -> EscapeUnicode { let c = self as u32; // or-ing 1 ensures that for c==0 the code computes that one @@ -518,9 +517,8 @@ impl char { /// assert_eq!('"'.escape_default().to_string(), "\\\""); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_char_escape_default", since = "1.50.0")] #[inline] - pub const fn escape_default(self) -> EscapeDefault { + pub fn escape_default(self) -> EscapeDefault { let init_state = match self { '\t' => EscapeDefaultState::Backslash('t'), '\r' => EscapeDefaultState::Backslash('r'),