supply 0.2.0

Provider API for arbitrary number of lifetimes.
Documentation
//! Tests for the lt_list module's api.
//!
//! The lt_list module is all type level constructs so the tests in
//! this module may look very strange.

/*
use std::panic::{RefUnwindSafe, UnwindSafe};

use supply::lt_list::*;

// LtList
const _: () = {
    // LtList must not be object safe.
    trait AssertSuper: Sized + Send + Sync + Unpin + RefUnwindSafe + UnwindSafe {}
    #[allow(clippy::needless_maybe_sized)]
    impl<L: ?Sized + LtList> AssertSuper for L {}

    fn with_l<L: LtList>() {
        // The tail of a list is always a list.
        fn assert_head<T: Sized + Send + Sync + Unpin + RefUnwindSafe + UnwindSafe>() {}
        assert_head::<L::Head>();

        // The tail of a list is always a list.
        fn assert_list<T: LtList>() {}
        assert_list::<L::Tail>();

        // Lt has a head of 'a and a tail of something.
        fn assert_chain<'a, T: LtList<Head = Lt1<'a>, Tail = L>, L: LtList>() {}
        assert_chain::<Lt<'_, L>, L>();
    }

    fn assert() {
        // () has a head of 'static and a tail of itself.
        fn assert_base<T: LtList<Head = Lt1<'static>, Tail = ()>>() {}
        // assert_base::<()>();
    }
};

// Lt
const _: () = {
    fn _with_t<L: LtList>() {
        // Static always implements all the auto traits.
        fn assert_auto<T: Send + Sync + Unpin + RefUnwindSafe + UnwindSafe + Sized>() {}
        assert_auto::<Lt<L>>();
    }

    // Lt's LtList properties are tested above.
};

// LtX
const _: () = {
    #[allow(clippy::extra_unused_lifetimes)]
    fn with_t<'l0, 'l1, 'l2, 'l3, 'l4, 'l5, L: LtList>() {
        fn assert<T: Is<U>, U>() {}

        assert::<Lt0, ()>();
        assert::<Lt0<L>, L>();

        assert::<Lt1<'l0>, Lt<'l0, ()>>();
        assert::<Lt1<'l0, L>, Lt<'l0, L>>();

        assert::<Lt2<'l0, 'l1>, Lt<'l0, Lt<'l1, ()>>>();
        assert::<Lt2<'l0, 'l1, L>, Lt<'l0, Lt<'l1, L>>>();

        assert::<Lt3<'l0, 'l1, 'l2>, Lt<'l0, Lt<'l1, Lt<'l2, ()>>>>();
        assert::<Lt3<'l0, 'l1, 'l2, L>, Lt<'l0, Lt<'l1, Lt<'l2, L>>>>();

        assert::<Lt4<'l0, 'l1, 'l2, 'l3>, Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, ()>>>>>();
        assert::<Lt4<'l0, 'l1, 'l2, 'l3, L>, Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, L>>>>>();

        assert::<Lt5<'l0, 'l1, 'l2, 'l3, 'l4>, Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, Lt<'l4, ()>>>>>>();
        assert::<Lt5<'l0, 'l1, 'l2, 'l3, 'l4, L>, Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, Lt<'l4, L>>>>>>();

        assert::<
            Lt6<'l0, 'l1, 'l2, 'l3, 'l4, 'l5>,
            Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, Lt<'l4, Lt<'l5, ()>>>>>>,
        >();
        assert::<
            Lt6<'l0, 'l1, 'l2, 'l3, 'l4, 'l5, L>,
            Lt<'l0, Lt<'l1, Lt<'l2, Lt<'l3, Lt<'l4, Lt<'l5, L>>>>>>,
        >();
    }
};

// Head/Tail
const _: () = {
    fn with_l<L: LtList>() {
        fn assert<T: Is<U>, U>() {}

        // Head gets the head of the list.
        assert::<L::Head, HeadOf<L>>();

        // Tail gets the tail of the list.
        assert::<L::Tail, TailOf<L>>();
    }
};

#[allow(unused)]
trait Is<U> {}
impl<T> Is<T> for T {}
*/