Skip to content

Commit 5ab5259

Browse files
committed
ptr::try_cast_aligned: #[inline]
1 parent b0b8b86 commit 5ab5259

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library/core/src/ptr/const_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<T: ?Sized> *const T {
8787
#[unstable(feature = "pointer_try_cast_aligned", issue = "141221")]
8888
#[must_use = "this returns the result of the operation, \
8989
without modifying the original"]
90-
#[inline(always)]
90+
#[inline]
9191
pub fn try_cast_aligned<U>(self) -> Option<*const U> {
9292
if self.is_aligned_to(align_of::<U>()) { Some(self.cast()) } else { None }
9393
}

library/core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<T: ?Sized> *mut T {
6969
#[unstable(feature = "pointer_try_cast_aligned", issue = "141221")]
7070
#[must_use = "this returns the result of the operation, \
7171
without modifying the original"]
72-
#[inline(always)]
72+
#[inline]
7373
pub fn try_cast_aligned<U>(self) -> Option<*mut U> {
7474
if self.is_aligned_to(align_of::<U>()) { Some(self.cast()) } else { None }
7575
}

library/core/src/ptr/non_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ impl<T: ?Sized> NonNull<T> {
511511
#[unstable(feature = "pointer_try_cast_aligned", issue = "141221")]
512512
#[must_use = "this returns the result of the operation, \
513513
without modifying the original"]
514-
#[inline(always)]
514+
#[inline]
515515
pub fn try_cast_aligned<U>(self) -> Option<NonNull<U>> {
516516
if self.is_aligned_to(align_of::<U>()) { Some(self.cast()) } else { None }
517517
}

0 commit comments

Comments
 (0)