Releases: TedDriggs/darling
Releases · TedDriggs/darling
v0.20.10
v0.20.8
v0.20.7
v0.20.6
v0.20.5
v0.20.4
- Accept bare paths in
#[darling(default = ...)]
#258 - Add
FromMeta
impl forPathBuf
#259 - Improve
FromMeta
implementation for enums #260- Properly implement unit arms in
FromMeta::from_list
to provide a consistent API for heterogeneous enums that include a mix of unit, newtype and struct variants - Add
#[darling(word)]
attribute for unit enum variants (See #63 for details)
- Properly implement unit arms in
v0.20.3
- Add
FromMeta
impl foru128
andi128
#243
This release also includes features originally slated for 0.20.2, as that was never published.
v0.20.1
v0.20.0
v0.20.0 (April 27, 2023)
Breaking Changes
-
Replace all occurrences of syn::NestedMeta with darling::ast::NestedMeta.
-
Replacement for the deprecated AttributeArgs:
// 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 nowLifetimeParam
. - In GenericParamExt,
as_lifetime_def
is renamed toas_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.