Hi,
I am trying to implement something that looks like this for some tuple struct Array :
impl<T: std::marker::Sized> Array<T, U3> {
pub fn new(x: T, y: T, z: T) -> Array<T, U3> {
let data: GenericArray<T, U3> = arr![T; x, y, z];
Array { data }
}
}
Unfortunately this seems to be impossible for now and the compilers complains that arr![T; x, y, z] has no fixed size at compile-time. It even points me to the impl<T: std::marker::Sized> telling me the parameter nneds to be std::marker::Sized even if it is already bounded.
I suppose there must be a way in the macro to add this condition on T without loss of generality but I'm not familiar with procedural macros myself.
Any tip here?
Cheers,
Philippe