diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cef69e..b2358c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## v0.20.0 (April 27, 2023) + +- Bump syn to version 2, courtesy of @jonasbb [#227](https://github.com/TedDriggs/darling/issues/227) + +### Breaking Changes + +- Replace all occurrences of syn::NestedMeta with darling::ast::NestedMeta. + +- Replacement for the deprecated AttributeArgs: + +```rust +// Before + +parse_macro_input!(args as AttributeArgs); + +// After + +match NestedMeta::parse_meta_list(args) { + Ok(v) => v, + Err(e) => { + return TokenStream::from(Error::from(e).write_errors()); + } +}; +``` + +- In GenericParamExt, `LifetimeDef` is now `LifetimeParam`. +- In GenericParamExt, `as_lifetime_def` is renamed to `as_lifetime_param`. +- Flag and SpannedValue no longer implement `syn::spanned::Spanned`. +- The MSRV (minimum supported Rust version) is now 1.56, because of syn. + +### Deprecation Warnings + +In previous versions of `darling`, arbitrary expressions were passed in attributes by wrapping them in quotation marks. +v0.20.0 preserves this behavior for `syn::Expr`, but as a result a field expecting a `syn::Expr` cannot accept a string literal - it will incorrectly attempt to parse the contents. If this is an issue for you, please add a comment to [#229](https://github.com/TedDriggs/darling/issues/229). + ## v0.14.4 (March 9, 2023) - Add support for child diagnostics when `diagnostics` feature enabled [#224](https://github.com/TedDriggs/darling/issues/224)