#[cfg(feature = "nightly-phantom-variance")]
pub use core::marker::PhantomCovariantLifetime;
#[cfg(not(feature = "nightly-phantom-variance"))]
mod polyfill {
use core::marker::PhantomData;
#[derive(Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct PhantomCovariantLifetime<'a>(PhantomData<fn() -> &'a ()>);
impl PhantomCovariantLifetime<'_> {
pub const fn new() -> Self {
Self(PhantomData)
}
}
impl core::fmt::Debug for PhantomCovariantLifetime<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.write_str("PhantomCovariantLifetime")
}
}
}
#[cfg(not(feature = "nightly-phantom-variance"))]
pub use polyfill::PhantomCovariantLifetime;