Commit 58c2ba5 1 parent 36854b6 commit 58c2ba5 Copy full SHA for 58c2ba5
File tree 1 file changed +2
-0
lines changed
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
21
21
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
22
22
#[ inline]
23
23
#[ must_use]
24
+ #[ cfg_attr( not( bootstrap) , allow( redundant_transmutation) ) ]
24
25
pub ( super ) const unsafe fn from_u32_unchecked ( i : u32 ) -> char {
25
26
// SAFETY: the caller must guarantee that `i` is a valid char value.
26
27
unsafe {
@@ -229,6 +230,7 @@ impl FromStr for char {
229
230
}
230
231
231
232
#[ inline]
233
+ #[ cfg_attr( not( bootstrap) , allow( redundant_transmutation) ) ]
232
234
const fn char_try_from_u32 ( i : u32 ) -> Result < char , CharTryFromError > {
233
235
// This is an optimized version of the check
234
236
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),
You can’t perform that action at this time.
0 commit comments