Skip to content

Derive macros should #[allow(unused_qualifications)] #467

@jsuereth

Description

@jsuereth

I ran into an issue with the following code:

#[derive(Serialize, Deserialize, JsonSchema)]
#[serde(tag = "version")]
#[allow(unused_qualifications)]
pub enum Versioned {
    #[serde(rename = "1")]
    V1(StructureForV1),
    #[serde(rename = "2")]
    V2(StructureForV2),
}

This would result in failures with our lint rules, "unecessary qualification" tagged on the V1 or V2 structures.

To work around this, I just generated the code from the macro, copy-pasted into my file and added #[allow(unused_qualification)].

Metadata

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