Skip to content

XmlDeserialize panics #60

Closed
Closed
@bilelmoussaoui

Description

With the latest xmlserde_derive, the following code panics

#[derive(Clone, Debug, XmlDeserialize)]
pub enum ParameterType {
    #[xmlserde(name = b"type")]
    Type(Type),
    #[xmlserde(name = b"array")]
    Array(Array),
    #[xmlserde(name = b"varargs")]
    VarArgs,
}

with the following error

error: expected pattern, found `,`
Error:   --> src/parameter.rs:47:33
   |
47 | #[derive(Clone, Debug, Default, XmlDeserialize)]
   |                                 ^^^^^^^^^^^^^^ expected pattern
   |
   = note: this error originates in the derive macro `XmlDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error: proc-macro derive produced unparsable tokens
Error:   --> src/parameter.rs:47:33
   |
47 | #[derive(Clone, Debug, Default, XmlDeserialize)]
   |                                 ^^^^^^^^^^^^^^

error: could not compile `gir-parser` (lib) due to 2 previous errors

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions