diff --git a/core/src/hlist.rs b/core/src/hlist.rs index 31a24ac5..ed5859fc 100644 --- a/core/src/hlist.rs +++ b/core/src/hlist.rs @@ -102,7 +102,7 @@ pub trait HList: Sized { /// assert_eq!(h.len(), 2); /// # } /// ``` - #[deprecated(since = "0.5.0", note = "Please use Len::USIZE instead")] + #[deprecated(since = "0.5.0", note = "Please use ::Len::[USIZE | U8 | U32 | ... ] instead")] #[inline] fn len(&self) -> usize { ::USIZE @@ -266,6 +266,9 @@ macro_rules! gen_inherent_methods { pub fn len(&self) -> usize where Self: HList, { + // this is how it's done at the type-level + // ::Len::USIZE + #[allow(deprecated)] HList::len(self) } @@ -286,6 +289,8 @@ macro_rules! gen_inherent_methods { where Self: HList, { HList::is_empty(self) + // this is how it's done at the type-level + // <<::Len as typenum::IsEqual>::Output as typenum::Bit>::BOOL } /// Prepend an item to the current HList