We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 722d284 commit 9666623Copy full SHA for 9666623
library/core/src/char/convert.rs
@@ -21,6 +21,7 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
21
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
22
#[inline]
23
#[must_use]
24
+#[cfg_attr(not(bootstrap), allow(redundant_transmutation))]
25
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
26
// SAFETY: the caller must guarantee that `i` is a valid char value.
27
unsafe {
@@ -229,6 +230,7 @@ impl FromStr for char {
229
230
}
231
232
233
234
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
235
// This is an optimized version of the check
236
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),
0 commit comments