switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable
This commit is contained in:
parent
3948b054dc
commit
05f4a9a42a
24 changed files with 81 additions and 39 deletions
|
@ -2045,7 +2045,8 @@ assert_eq!(
|
|||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
||||
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||
// transmute them to arrays of bytes
|
||||
#[allow_internal_unstable(const_fn_transmute)]
|
||||
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
|
||||
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
|
||||
#[inline]
|
||||
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
|
||||
// SAFETY: integers are plain old datatypes so we can always transmute them to
|
||||
|
@ -2193,7 +2194,8 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
|
|||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
||||
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||
// transmute to them
|
||||
#[allow_internal_unstable(const_fn_transmute)]
|
||||
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
|
||||
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
|
||||
#[inline]
|
||||
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
|
||||
// SAFETY: integers are plain old datatypes so we can always transmute to them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue