Skip to content

Commit 30a32eb

Browse files
Remove AsciiChar impls
1 parent 5785a90 commit 30a32eb

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

library/core/src/ascii/ascii_char.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,26 +1170,6 @@ macro_rules! into_int_impl {
11701170

11711171
into_int_impl!(u8 u16 u32 u64 u128 char);
11721172

1173-
#[unstable(feature = "ascii_char", issue = "110998")]
1174-
impl AsRef<str> for AsciiChar {
1175-
#[inline(always)]
1176-
fn as_ref(&self) -> &str {
1177-
self.as_str()
1178-
}
1179-
}
1180-
1181-
#[unstable(feature = "ascii_char", issue = "110998")]
1182-
impl AsMut<str> for AsciiChar {
1183-
#[inline(always)]
1184-
fn as_mut(&mut self) -> &mut str {
1185-
let ascii_ptr: *mut [Self] = crate::slice::from_mut(self);
1186-
let str_ptr = ascii_ptr as *mut str;
1187-
// SAFETY: Each ASCII codepoint in UTF-8 is encoded as one single-byte
1188-
// code unit having the same value as the ASCII byte.
1189-
unsafe { &mut *str_ptr }
1190-
}
1191-
}
1192-
11931173
impl [AsciiChar] {
11941174
/// Views this slice of ASCII characters as a UTF-8 `str`.
11951175
#[unstable(feature = "ascii_char", issue = "110998")]

0 commit comments

Comments
 (0)