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
When you use an array inside the json! macro, the expansion calls vec! unqualified. This is a problem in a no_std environment, because it requires the user to use alloc::vec. Which is weird and no expected from a macro.
When you use an array inside the
json!
macro, the expansion callsvec!
unqualified. This is a problem in ano_std
environment, because it requires the user touse alloc::vec
. Which is weird and no expected from a macro.Reproducer on rustexplorer: https://www.rustexplorer.com/b#LyoKW2RlcGVuZGVuY2llc10Kc2VyZGVfanNvbiA9IHsgdmVyc2lvbiA9ICIxLjAuMTIwIiwgZGVmYXVsdC1mZWF0dXJlcyA9IGZhbHNlLCBmZWF0dXJlcyA9IFsiYWxsb2MiXSB9CiovCgojIVtub19zdGRdCgpleHRlcm4gY3JhdGUgYWxsb2M7CgpmbiBtYWluKCkgewogICAgc2VyZGVfanNvbjo6anNvbiEoWyIiLCAiIl0pOwp9Cg==
Code:
I think this issue has a simple solution by changing
vec!
to::alloc::vec!
, unless I'm missing something.The text was updated successfully, but these errors were encountered: