pub trait TupleAppend<T> {
type Output;
fn tuple_append(self, right: T) -> Self::Output;
}
#[cfg(not(feature = "unstable"))]
#[allow(dead_code)]
mod polyfill {
pub(crate) struct NonNull<T: ?Sized> {
ptr: *mut T,
}
impl<T: ?Sized> Clone for NonNull<T> {
fn clone(&self) -> Self {
*self
}
}
impl<T: ?Sized> Copy for NonNull<T> {}
impl<T: ?Sized> NonNull<T> {
pub(crate) unsafe fn new_unchecked(ptr: *mut T) -> Self {
Self { ptr }
}
pub(crate) fn new(ptr: *mut T) -> Option<Self> {
if ptr.is_null() {
None
} else {
Some(unsafe { Self::new_unchecked(ptr) })
}
}
pub(crate) fn as_ptr(self) -> *mut T {
self.ptr
}
}
}
#[cfg(not(feature = "unstable"))]
#[allow(unused_imports)]
pub(crate) use self::polyfill::*;
#[cfg(feature = "unstable")]
#[allow(dead_code)]
pub(crate) type NonNull<T> = ::std::ptr::NonNull<T>;