Skip to content

Conversation

@DarkCat09
Copy link

Closes #306

@DarkCat09 DarkCat09 marked this pull request as ready for review January 29, 2026 18:34
@DarkCat09
Copy link
Author

I've never written proc macros before, please point out if i used a non-idiomatic and/or ineffective approach somewhere

@DarkCat09
Copy link
Author

Pure syn is used instead of darling because it seems impossible to make darling accept any unknown attributes (since we don't want to re-implement the whole serde macros)

let mut res = None;
meta.parse_nested_meta(|meta| {
let value = meta.value()?;
let s: LitStr = value.parse()?;
Copy link
Author

@DarkCat09 DarkCat09 Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing = & LitStr tokens is required no matter whether we get deserialize ident or not, because otherwise we leave the parser at the same position and don't get valid next attribute tokens on the next loop iteration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renamed property name is no longer used in the error report (0.17.0)

1 participant