Typenum: marker trait not working?

I'm trying to wrap a GenericArray in my own type to implement some more traits on them.
But I'm stumbling upon a weird behaviour from the typenum crate.

Here is a minimal example to show the problem:

The compiler complains that the associated item "USIZE" is not found, and suggests to use
the marker trait "Unsigned", which contains the associated item.
But I AM using that marker trait already!
Why doesn't the compiler find the item then?

You can't parameterize the length of an array by some generics. This is exactly the reason why the generic-array crate exists. We would need const_generics to support this, but that's still in it's early phases, so I wouldn't wait for it.

Ok, thanks for clarifying! I wish the compiler error would explain the situation instead of making nonsensical suggestions...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.