The macro_rules treat -1
as not a pattern
#42820
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
I need a enum which is deserialized with
serde
from number:-1
,0
and1
.When I try to use
enum_number
macro from officialserde
documentation I get this:The code is very simple:
If I change
-1
to a positive number it compiles okay. I think it is a problem.The text was updated successfully, but these errors were encountered: