use std::cell::Cell;
use lender::{FallibleLend, FallibleLender, FallibleLending, Lend, Lender, Lending};
struct InvariantEmpty;
impl<'lend> Lending<'lend> for InvariantEmpty {
type Lend = &'lend Cell<Option<&'lend String>>;
}
impl Lender for InvariantEmpty {
lender::check_covariance!();
fn next(&mut self) -> Option<Lend<'_, Self>> {
None
}
}
struct InvariantFallibleEmpty<E>(std::marker::PhantomData<E>);
impl<'lend, E> FallibleLending<'lend> for InvariantFallibleEmpty<E> {
type Lend = &'lend Cell<Option<&'lend String>>;
}
impl<E> FallibleLender for InvariantFallibleEmpty<E> {
type Error = E;
lender::check_covariance_fallible!();
fn next(&mut self) -> Result<Option<FallibleLend<'_, Self>>, Self::Error> {
Ok(None)
}
}
fn main() {}