Skip to content

Commit

Permalink
make mem::{zeroed,uninitialized} inline(always)
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 16, 2020
1 parent 996a51b commit a2160e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ pub const fn needs_drop<T>() -> bool {
///
/// let _x: &i32 = unsafe { mem::zeroed() }; // Undefined behavior!
/// ```
#[inline]
#[inline(always)]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated_in_future)]
#[allow(deprecated)]
Expand Down Expand Up @@ -525,7 +525,7 @@ pub unsafe fn zeroed<T>() -> T {
/// [uninit]: union.MaybeUninit.html#method.uninit
/// [assume_init]: union.MaybeUninit.html#method.assume_init
/// [inv]: union.MaybeUninit.html#initialization-invariant
#[inline]
#[inline(always)]
#[rustc_deprecated(since = "1.39.0", reason = "use `mem::MaybeUninit` instead")]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated_in_future)]
Expand Down

0 comments on commit a2160e6

Please sign in to comment.