diff options
Diffstat (limited to 'library/core/src/array/ascii.rs')
| -rw-r--r-- | library/core/src/array/ascii.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/array/ascii.rs b/library/core/src/array/ascii.rs index 6750d7c0711..a942b9e4ae3 100644 --- a/library/core/src/array/ascii.rs +++ b/library/core/src/array/ascii.rs @@ -7,7 +7,7 @@ impl<const N: usize> [u8; N] { #[unstable(feature = "ascii_char", issue = "110998")] #[must_use] #[inline] - pub fn as_ascii(&self) -> Option<&[ascii::Char; N]> { + pub const fn as_ascii(&self) -> Option<&[ascii::Char; N]> { if self.is_ascii() { // SAFETY: Just checked that it's ASCII Some(unsafe { self.as_ascii_unchecked() }) |
