We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db768e commit cb50cf3Copy full SHA for cb50cf3
library/core/src/num/niche_types.rs
@@ -58,7 +58,8 @@ macro_rules! define_valid_range_type {
58
pub const fn as_inner(self) -> $int {
59
// SAFETY: This is a transparent wrapper, so unwrapping it is sound
60
// (Not using `.0` due to MCP#807.)
61
- unsafe { crate::mem::transmute(self) }
+ // SAFETY: size is already asserted in the const block above
62
+ unsafe { crate::intrinsics::transmute_unchecked(self) }
63
}
64
65
0 commit comments