It seems like unsuccessfully parsing a syn::ExprRange causes a literal to be swallowed.
In this playground code I had expected to get an Ok(Single(LitChar { token: 'a' })) instead of an Err(Error("unexpected end of input, expected character literal")) from the call to parse2.
It seems like unsuccessfully parsing a
syn::ExprRange
causes a literal to be swallowed.In this playground code I had expected to get an
Ok(Single(LitChar { token: 'a' }))
instead of anErr(Error("unexpected end of input, expected character literal"))
from the call toparse2
.When trying with
quote!('a' 'b')
instead I getOk(Single(LitChar { token: 'b' }))
.Not sure if I am misusing the API and this is intended behaviour, or if I hit a bug?