Skip to content

serde 1.0.90

  • Add an attribute #[serde(crate = "path::to::serde")] which replaces the use of extern crate serde in the generated code; this is intended for crates that invoke Serde derives from a macro and need to refer to serde through their own re-export rather than requiring callers to list Serde in Cargo.toml (#1499, thanks @sgrif)

    #[derive(Deserialize)]
    #[serde(crate = "__tw::codegen::serde")]
    struct S { ... }
    
    // expands to:
    impl<'de> __tw::codegen::serde::Deserialize<'de> for S {
        ...
    }