You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, in this situation it seems to be doing a partial match on the 2nd case, ($array_type:ty) => { ... };, which then fails because that's not actually what you wanted.
I don't think there's an easy fix here, because changing the ordering of the match arms can break other people's code instead.
I'll link this issue in the discord and perhaps a macro expert can swoop in and solve the problem.
In the mean time, array_vec!([(f32,f32); 3] => (2.0, 2.0), (2.0, 2.0), (2.0, 2.0)) is more verbose but does work how you want (playground example).
This expression tries to construct an
ArrayVec
with element type(f32, f32)
but cannot compile:The error goes like:
Meanwhile, the
vec!
macro can handle this well.The text was updated successfully, but these errors were encountered: