Skip to content

Commit b93553c

Browse files
committed
For consistency, move NonNull impl to non_null.rs.
1 parent 833c374 commit b93553c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

library/core/src/marker.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ marker_impls! {
10031003
{T} &mut T,
10041004
{T} *const T,
10051005
{T} *mut T,
1006-
{T} crate::ptr::NonNull<T>,
10071006
{T: PointerLike} crate::pin::Pin<T>,
10081007
}
10091008

library/core/src/ptr/non_null.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,10 @@ impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: U
15481548
#[stable(feature = "pin", since = "1.33.0")]
15491549
unsafe impl<T: ?Sized> PinCoerceUnsized for NonNull<T> {}
15501550

1551+
#[unstable(feature = "pointer_like_trait", issue = "none")]
1552+
#[cfg(not(bootstrap))]
1553+
impl<T> core::marker::PointerLike for NonNull<T> {}
1554+
15511555
#[stable(feature = "nonnull", since = "1.25.0")]
15521556
impl<T: ?Sized> fmt::Debug for NonNull<T> {
15531557
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)