serde icon indicating copy to clipboard operation
serde copied to clipboard

Consider supporting concat! macro in attributes

Open dtolnay opened this issue 6 years ago • 2 comments

For example a macro_rules macro might expand to:

#[derive(Serialize)]
struct $struct {
    $(
        #[serde(rename = concat!($prefix, stringify!($field)))]
        $field: $ty,
    )*
}

dtolnay avatar Sep 18 '19 16:09 dtolnay

(Repeating what I said in #1895)

Related: #450 (which is asking for #[serde(rename = SOME_CONST)], which I think has similar technical constraints).

davidhewitt avatar Sep 26 '20 10:09 davidhewitt

Any update? Thanks 😥

carlocorradini avatar Feb 26 '25 09:02 carlocorradini