no rules expected the token `STRUCT`
antage opened this issue · 1 comments
antage commented
I tried to code an error for quick-xml error (http://tafia.github.io/quick-xml/quick_xml/error/type.ResultPos.html):
quick_error! {
#[derive(Debug)]
pub enum DictError {
XmlError { err: quick_xml::error::Error, pos: usize } {
from(terr: (quick_xml::error::Error, usize)) -> {
err: terr.0,
pos: terr.1,
}
}
}
}
but I got following error:
<quick_error macros>:99:26: 99:42 error: no rules expected the token `STRUCT`
<quick_error macros>:99 $ ( # [ $ bmeta ] ) * => $ bitem : STRUCT [ $ ( $ qvar : $ qtyp ) , * ] ]
I can't realize what's wrong.
antage commented
It seems a trailing comma (here: pos: terr.1,
) causes the error.