Commit f8c735e
fix(deps): update rust crate syn to v2 (#329)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [syn](https://redirect.github.com/dtolnay/syn) | dependencies | major
| `1.0.109` -> `2.0.0` |
---
### Release Notes
<details>
<summary>dtolnay/syn (syn)</summary>
###
[`v2.0.100`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.100)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.99...2.0.100)
- Add `Visit::visit_token_stream`, `VisitMut::visit_token_stream_mut`,
`Fold::fold_token_stream` for processing TokenStream during syntax tree
traversals
([#​1852](https://redirect.github.com/dtolnay/syn/issues/1852))
###
[`v2.0.99`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.99)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.98...2.0.99)
- Documentation improvements
###
[`v2.0.98`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.98)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.97...2.0.98)
- Allow lifetimes in function pointer return values in
`ParseStream::call` and `Punctuated` parsers
([#​1847](https://redirect.github.com/dtolnay/syn/issues/1847))
###
[`v2.0.97`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.97)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.96...2.0.97)
- Documentation improvements
###
[`v2.0.96`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.96)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.95...2.0.96)
- Expression precedence fixes
([#​1834](https://redirect.github.com/dtolnay/syn/issues/1834),
[#​1836](https://redirect.github.com/dtolnay/syn/issues/1836),
[#​1837](https://redirect.github.com/dtolnay/syn/issues/1837),
[#​1838](https://redirect.github.com/dtolnay/syn/issues/1838),
[#​1839](https://redirect.github.com/dtolnay/syn/issues/1839),
[#​1840](https://redirect.github.com/dtolnay/syn/issues/1840))
###
[`v2.0.95`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.95)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.94...2.0.95)
- Fix parenthesization of struct literals in let-chains
([#​1832](https://redirect.github.com/dtolnay/syn/issues/1832))
###
[`v2.0.94`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.94)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.93...2.0.94)
- Expression precedence fixes
([#​1811](https://redirect.github.com/dtolnay/syn/issues/1811),
[#​1812](https://redirect.github.com/dtolnay/syn/issues/1812),
[#​1813](https://redirect.github.com/dtolnay/syn/issues/1813),
[#​1814](https://redirect.github.com/dtolnay/syn/issues/1814),
[#​1815](https://redirect.github.com/dtolnay/syn/issues/1815),
[#​1816](https://redirect.github.com/dtolnay/syn/issues/1816),
[#​1818](https://redirect.github.com/dtolnay/syn/issues/1818),
[#​1819](https://redirect.github.com/dtolnay/syn/issues/1819),
[#​1820](https://redirect.github.com/dtolnay/syn/issues/1820),
[#​1825](https://redirect.github.com/dtolnay/syn/issues/1825),
[#​1826](https://redirect.github.com/dtolnay/syn/issues/1826),
[#​1827](https://redirect.github.com/dtolnay/syn/issues/1827),
[#​1828](https://redirect.github.com/dtolnay/syn/issues/1828),
[#​1829](https://redirect.github.com/dtolnay/syn/issues/1829),
[#​1830](https://redirect.github.com/dtolnay/syn/issues/1830))
###
[`v2.0.93`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.93)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.92...2.0.93)
- Fix expression parsing edge cases: `x as T <<= y`
([#​1804](https://redirect.github.com/dtolnay/syn/issues/1804)),
`break as T`
([#​1805](https://redirect.github.com/dtolnay/syn/issues/1805)),
`match x { _ if .. => {} }`
([#​1807](https://redirect.github.com/dtolnay/syn/issues/1807))
- Fix expression printing edge cases: `|| -> T 'a: {}`
([#​1806](https://redirect.github.com/dtolnay/syn/issues/1806)),
`if break x {}`
([#​1808](https://redirect.github.com/dtolnay/syn/issues/1808),
[#​1810](https://redirect.github.com/dtolnay/syn/issues/1810))
###
[`v2.0.92`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.92)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.91...2.0.92)
- Fix parenthesization of jumps inside ranges
([#​1798](https://redirect.github.com/dtolnay/syn/issues/1798))
###
[`v2.0.91`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.91)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.90...2.0.91)
- Support parsing `Vec<Arm>` using `parse_quote!`
([#​1796](https://redirect.github.com/dtolnay/syn/issues/1796),
[#​1797](https://redirect.github.com/dtolnay/syn/issues/1797))
###
[`v2.0.90`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.90)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.89...2.0.90)
- Fix automatic parenthesization of subexpressions containing outer
attributes, such as `(#[attr] thing).field`
([#​1785](https://redirect.github.com/dtolnay/syn/issues/1785))
- Fix automatic parenthesization of function calls via a struct field,
such as `(thing.field)()` and `thing.0()`
([#​1786](https://redirect.github.com/dtolnay/syn/issues/1786))
###
[`v2.0.89`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.89)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.88...2.0.89)
- Fix *"compiler/fallback mismatch 949"* panic
([https://github.com/dtolnay/proc-macro2/issues/483](https://redirect.github.com/dtolnay/proc-macro2/issues/483))
###
[`v2.0.88`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.88)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.87...2.0.88)
- Improve error recovery in `parse_str`
([#​1783](https://redirect.github.com/dtolnay/syn/issues/1783))
###
[`v2.0.87`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.87)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.86...2.0.87)
- Add
[`Cursor::any_group`](https://docs.rs/syn/2/syn/buffer/struct.Cursor.html#method.any_group)
([#​1777](https://redirect.github.com/dtolnay/syn/issues/1777))
- Add
[`Expr::peek`](https://docs.rs/syn/2/syn/enum.Expr.html#method.peek)
([#​1778](https://redirect.github.com/dtolnay/syn/issues/1778))
- Improve syntax support for enum discriminant expressions in non-"full"
mode
([#​1779](https://redirect.github.com/dtolnay/syn/issues/1779))
###
[`v2.0.86`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.86)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.85...2.0.86)
- Support peeking the end of a parse stream
([#​1689](https://redirect.github.com/dtolnay/syn/issues/1689))
- Allow `parse_quote!` to produce Vec\<Attribute>
([#​1775](https://redirect.github.com/dtolnay/syn/issues/1775))
###
[`v2.0.85`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.85)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.84...2.0.85)
- Preserve extern static unsafety in ForeignItem::Verbatim
([#​1773](https://redirect.github.com/dtolnay/syn/issues/1773))
###
[`v2.0.84`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.84)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.83...2.0.84)
- Parse safe and explicitly unsafe extern items
([#​1768](https://redirect.github.com/dtolnay/syn/issues/1768),
[https://github.com/rust-lang/rust/issues/123743](https://redirect.github.com/rust-lang/rust/issues/123743),
[https://github.com/rust-lang/rfcs/pull/3484](https://redirect.github.com/rust-lang/rfcs/pull/3484))
- Parse self captures: `impl Sized + use<Self>`
([#​1772](https://redirect.github.com/dtolnay/syn/issues/1772))
###
[`v2.0.83`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.83)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.82...2.0.83)
- Documentation improvements
###
[`v2.0.82`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.82)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.81...2.0.82)
- Provide `Parse` impls for PreciseCapture and CapturedParam
([#​1757](https://redirect.github.com/dtolnay/syn/issues/1757),
[#​1758](https://redirect.github.com/dtolnay/syn/issues/1758))
- Support parsing `unsafe` attributes
([#​1759](https://redirect.github.com/dtolnay/syn/issues/1759))
- Add Fold and VisitMut methods for Vec\<Attribute>
([#​1762](https://redirect.github.com/dtolnay/syn/issues/1762))
###
[`v2.0.81`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.81)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.80...2.0.81)
- Add TypeParamBound::PreciseCapture to represent precise capture syntax
`impl Trait + use<'a, T>`
([#​1752](https://redirect.github.com/dtolnay/syn/issues/1752),
[#​1753](https://redirect.github.com/dtolnay/syn/issues/1753),
[#​1754](https://redirect.github.com/dtolnay/syn/issues/1754))
###
[`v2.0.80`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.80)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.79...2.0.80)
- Add `Expr::RawAddr`
([#​1743](https://redirect.github.com/dtolnay/syn/issues/1743))
- Reject precise captures and ~const in inappropriate syntax positions
([#​1747](https://redirect.github.com/dtolnay/syn/issues/1747))
- Reject trait bound containing only precise capture
([#​1748](https://redirect.github.com/dtolnay/syn/issues/1748))
###
[`v2.0.79`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.79)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.78...2.0.79)
- Fix infinite loop on parsing chained ranges
([#​1741](https://redirect.github.com/dtolnay/syn/issues/1741))
- Fix panic in parsing `use` items containing absolute paths
([#​1742](https://redirect.github.com/dtolnay/syn/issues/1742))
###
[`v2.0.78`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.78)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.77...2.0.78)
- Fix infinite loop on chained comparison
([#​1739](https://redirect.github.com/dtolnay/syn/issues/1739))
###
[`v2.0.77`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.77)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.76...2.0.77)
- Support parsing `Expr::Tuple` in non-"full" mode
([#​1727](https://redirect.github.com/dtolnay/syn/issues/1727))
###
[`v2.0.76`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.76)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.75...2.0.76)
- Enforce that tail call `become` keyword is followed by an expression
([#​1725](https://redirect.github.com/dtolnay/syn/issues/1725))
###
[`v2.0.75`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.75)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.74...2.0.75)
- Automatically fill in missing turbofish when printing ExprPath and
other paths in expression position
([#​1722](https://redirect.github.com/dtolnay/syn/issues/1722))
###
[`v2.0.74`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.74)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.73...2.0.74)
- Fix *"temporary is dropped and runs the destructor for type \`impl
Iterator\`"* regression affecting certain use of `Generics` iterator
methods
([#​1719](https://redirect.github.com/dtolnay/syn/issues/1719))
###
[`v2.0.73`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.73)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.72...2.0.73)
- Support parsing unnamed C varargs within function pointer types
([#​1711](https://redirect.github.com/dtolnay/syn/issues/1711))
- Improve synthesized error message on unexpected tokens at the end of
the expected contents of a delimited group
([#​1713](https://redirect.github.com/dtolnay/syn/issues/1713))
- Support parsing unstable tail call syntax
([#​1714](https://redirect.github.com/dtolnay/syn/issues/1714),
[https://github.com/rust-lang/rust/issues/112788](https://redirect.github.com/rust-lang/rust/issues/112788))
- Add
[`Fields::members`](https://docs.rs/syn/2.0.73/syn/enum.Fields.html#method.members)
iterator
([#​1716](https://redirect.github.com/dtolnay/syn/issues/1716),
thanks [@​Fancyflame](https://redirect.github.com/Fancyflame))
###
[`v2.0.72`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.72)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.71...2.0.72)
- Parse `use<'a, T>` precise capturing bounds
([#​1707](https://redirect.github.com/dtolnay/syn/issues/1707),
thanks
[@​compiler-errors](https://redirect.github.com/compiler-errors))
###
[`v2.0.71`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.71)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.70...2.0.71)
- Do not require mutable borrow in Punctuated::get()
([#​1706](https://redirect.github.com/dtolnay/syn/issues/1706),
thanks [@​lemunozm](https://redirect.github.com/lemunozm))
###
[`v2.0.70`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.70)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.69...2.0.70)
- Improve parenthesization of closures, jumps, ranges, chained
comparisons, and let
([#​1694](https://redirect.github.com/dtolnay/syn/issues/1694),
[#​1695](https://redirect.github.com/dtolnay/syn/issues/1695),
[#​1698](https://redirect.github.com/dtolnay/syn/issues/1698),
[#​1699](https://redirect.github.com/dtolnay/syn/issues/1699),
[#​1700](https://redirect.github.com/dtolnay/syn/issues/1700))
###
[`v2.0.69`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.69)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.68...2.0.69)
- Correctly parenthesize labeled loops inside a break value
([#​1692](https://redirect.github.com/dtolnay/syn/issues/1692))
- Add `Punctuated::get` and `get_mut`
([#​1693](https://redirect.github.com/dtolnay/syn/issues/1693))
###
[`v2.0.68`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.68)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.67...2.0.68)
- Improve panic location when `parse_quote!` parses invalid syntax
([#​1690](https://redirect.github.com/dtolnay/syn/issues/1690),
thanks [@​stepancheg](https://redirect.github.com/stepancheg))
- More efficient peek implementation for `Group` and `Lifetime`
([#​1687](https://redirect.github.com/dtolnay/syn/issues/1687))
###
[`v2.0.67`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.67)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.66...2.0.67)
- Produce more accurate error message locations for errors located at
the end of a nested group
([#​1679](https://redirect.github.com/dtolnay/syn/issues/1679),
[#​1680](https://redirect.github.com/dtolnay/syn/issues/1680))
- Support peeking `LitCStr` in ParseStream::peek
([#​1682](https://redirect.github.com/dtolnay/syn/issues/1682))
###
[`v2.0.66`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.66)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.65...2.0.66)
- Allow braced structs when parsing ExprLet
([#​1671](https://redirect.github.com/dtolnay/syn/issues/1671))
###
[`v2.0.65`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.65)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.64...2.0.65)
- Optimize the implementation of `Fold` to compile faster
([#​1666](https://redirect.github.com/dtolnay/syn/issues/1666),
[#​1667](https://redirect.github.com/dtolnay/syn/issues/1667),
[#​1668](https://redirect.github.com/dtolnay/syn/issues/1668))
###
[`v2.0.64`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.64)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.63...2.0.64)
- Support using ParseBuffer across `catch_unwind`
([#​1646](https://redirect.github.com/dtolnay/syn/issues/1646))
- Validate that the expression in a let-else ends in brace as required
by rustc
([#​1648](https://redirect.github.com/dtolnay/syn/issues/1648),
[#​1649](https://redirect.github.com/dtolnay/syn/issues/1649))
- Legalize invalid const generic arguments by wrapping in braces
([#​1654](https://redirect.github.com/dtolnay/syn/issues/1654),
[#​1655](https://redirect.github.com/dtolnay/syn/issues/1655))
- Fix some expression precedence edge cases involving `break` and
`return` in loop headers
([#​1656](https://redirect.github.com/dtolnay/syn/issues/1656))
- Always print closure bodies with a brace when the closure has an
explicit return type
([#​1658](https://redirect.github.com/dtolnay/syn/issues/1658))
- Automatically insert necessary parentheses in ToTokens for Expr when
required by expression precedence
([#​1659](https://redirect.github.com/dtolnay/syn/issues/1659))
- Support struct literal syntax in match guard expressions
([#​1662](https://redirect.github.com/dtolnay/syn/issues/1662))
###
[`v2.0.63`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.63)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.62...2.0.63)
- Parse and print long if-else-if chains without reliance on deep
recursion to avoid overflowing stack
([#​1644](https://redirect.github.com/dtolnay/syn/issues/1644),
[#​1645](https://redirect.github.com/dtolnay/syn/issues/1645))
###
[`v2.0.62`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.62)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.61...2.0.62)
- Reject invalid unparenthesized range and comparison operator
expressions
([#​1642](https://redirect.github.com/dtolnay/syn/issues/1642),
[#​1643](https://redirect.github.com/dtolnay/syn/issues/1643))
###
[`v2.0.61`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.61)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.60...2.0.61)
- Check for legal binding name in the ident of Pat::Ident
([#​1627](https://redirect.github.com/dtolnay/syn/issues/1627))
- Resolve unexpected_cfgs warning
([#​1635](https://redirect.github.com/dtolnay/syn/issues/1635))
###
[`v2.0.60`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.60)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.59...2.0.60)
- Improve how None-delimited groups are counted by `peek`
([#​1625](https://redirect.github.com/dtolnay/syn/issues/1625))
###
[`v2.0.59`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.59)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.58...2.0.59)
- Parse `c"…"` and `cr"…"` C-string literal syntax as `Lit::CStr`
([#​1502](https://redirect.github.com/dtolnay/syn/issues/1502))
###
[`v2.0.58`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.58)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.57...2.0.58)
- Support `$` in `custom_punctuation!` macro
([#​1611](https://redirect.github.com/dtolnay/syn/issues/1611))
###
[`v2.0.57`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.57)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.56...2.0.57)
- Eliminate dependency on `quote` when built with default-features
disabled and the "proc-macro" feature enabled
([#​1608](https://redirect.github.com/dtolnay/syn/issues/1608),
thanks [@​BD103](https://redirect.github.com/BD103))
###
[`v2.0.56`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.56)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.55...2.0.56)
- Apply RUSTC_WORKSPACE_WRAPPER when deciding whether to run
nightly-only tests
([#​1605](https://redirect.github.com/dtolnay/syn/issues/1605))
###
[`v2.0.55`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.55)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.54...2.0.55)
- Restore compatibility with rustc 1.56 through 1.59
([#​1603](https://redirect.github.com/dtolnay/syn/issues/1603))
###
[`v2.0.54`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.54)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.53...2.0.54)
- Fix dead code warning in generated code when using `custom_keyword!`
with syn's "printing" feature disabled
([#​1602](https://redirect.github.com/dtolnay/syn/issues/1602))
###
[`v2.0.53`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.53)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.52...2.0.53)
- Implement Copy, Clone, and ToTokens for syn::parse::Nothing
([#​1597](https://redirect.github.com/dtolnay/syn/issues/1597))
###
[`v2.0.52`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.52)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.51...2.0.52)
- Add an expression parser that uses match-arm's boundary rules
([#​1593](https://redirect.github.com/dtolnay/syn/issues/1593))
###
[`v2.0.51`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.51)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.50...2.0.51)
- Resolve non_local_definitions warnings in generated code under rustc
1.78-nightly
###
[`v2.0.50`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.50)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.49...2.0.50)
- Fix unused_imports warnings when compiled by rustc 1.78
###
[`v2.0.49`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.49)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.48...2.0.49)
- Improve error location when parsing from an empty string literal using
`LitStr::parse`
([#​1590](https://redirect.github.com/dtolnay/syn/issues/1590))
###
[`v2.0.48`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.48)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.47...2.0.48)
- Improve error message on unexpected token after `else`
([#​1578](https://redirect.github.com/dtolnay/syn/issues/1578))
###
[`v2.0.47`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.47)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.46...2.0.47)
- Improve error messages related to proc_macro::LexError
([#​1575](https://redirect.github.com/dtolnay/syn/issues/1575))
###
[`v2.0.46`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.46)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.45...2.0.46)
- Update proc-macro2 to fix caching issue when using a rustc-wrapper
such as sccache
###
[`v2.0.45`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.45)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.44...2.0.45)
- Parse unsupported expressions in enum discriminants of `DeriveInput`
as `Expr::Verbatim` in non-"full" mode, instead of error
([#​1513](https://redirect.github.com/dtolnay/syn/issues/1513))
- Support parsing `PatType` with `parse_quote!`
([#​1573](https://redirect.github.com/dtolnay/syn/issues/1573))
###
[`v2.0.44`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.44)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.43...2.0.44)
- Documentation improvements
###
[`v2.0.43`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.43)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.42...2.0.43)
- Insert trailing comma if not already present when printing a 1-tuple
in pattern position
([#​1553](https://redirect.github.com/dtolnay/syn/issues/1553))
###
[`v2.0.42`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.42)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.41...2.0.42)
- Documentation improvements
###
[`v2.0.41`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.41)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.40...2.0.41)
- Support parsing syn::Field in `parse_quote!`
([#​1548](https://redirect.github.com/dtolnay/syn/issues/1548))
###
[`v2.0.40`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.40)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.39...2.0.40)
- Fix some edge cases of handling None-delimited groups in expression
parser
([#​1539](https://redirect.github.com/dtolnay/syn/issues/1539),
[#​1541](https://redirect.github.com/dtolnay/syn/issues/1541),
[#​1542](https://redirect.github.com/dtolnay/syn/issues/1542),
[#​1543](https://redirect.github.com/dtolnay/syn/issues/1543),
[#​1544](https://redirect.github.com/dtolnay/syn/issues/1544),
[#​1545](https://redirect.github.com/dtolnay/syn/issues/1545))
###
[`v2.0.39`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.39)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.38...2.0.39)
- Fix parsing of return expression in match guards
([#​1528](https://redirect.github.com/dtolnay/syn/issues/1528))
- Improve error message on labeled loop as value expression for break
([#​1531](https://redirect.github.com/dtolnay/syn/issues/1531))
###
[`v2.0.38`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.38)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.37...2.0.38)
- Fix *"method 'peek' has an incompatible type for trait"* error when
defining `bool` as a custom keyword
([#​1518](https://redirect.github.com/dtolnay/syn/issues/1518),
thanks [@​Vanille-N](https://redirect.github.com/Vanille-N))
###
[`v2.0.37`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.37)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.36...2.0.37)
- Work around incorrect future compatibility warning in rustc
1.74.0-nightly
###
[`v2.0.36`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.36)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.35...2.0.36)
- Restore compatibility with `--generate-link-to-definition`
documentation builds
([#​1514](https://redirect.github.com/dtolnay/syn/issues/1514))
###
[`v2.0.35`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.35)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.34...2.0.35)
- Make rust-analyzer produce preferred brackets for invocations of
`Token!` macro
([#​1510](https://redirect.github.com/dtolnay/syn/issues/1510),
[#​1512](https://redirect.github.com/dtolnay/syn/issues/1512))
###
[`v2.0.34`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.34)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.33...2.0.34)
- Documentation improvements
###
[`v2.0.33`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.33)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.32...2.0.33)
- Special handling for the `(/*ERROR*/)` placeholder that rustc uses for
macros that fail to expand
###
[`v2.0.32`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.32)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.31...2.0.32)
- Add `Path::require_ident` accessor
([#​1496](https://redirect.github.com/dtolnay/syn/issues/1496),
thanks [@​Fancyflame](https://redirect.github.com/Fancyflame))
###
[`v2.0.31`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.31)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.30...2.0.31)
- Parse generics and where-clause on const items
([https://github.com/rust-lang/rust/issues/113521](https://redirect.github.com/rust-lang/rust/issues/113521))
###
[`v2.0.30`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.30)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.29...2.0.30)
- Parse unnamed struct/union type syntax
([https://github.com/rust-lang/rust/issues/49804](https://redirect.github.com/rust-lang/rust/issues/49804))
###
[`v2.0.29`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.29)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.28...2.0.29)
- Partially work around rust-analyzer bug
([https://github.com/rust-lang/rust-analyzer/issues/9911](https://redirect.github.com/rust-lang/rust-analyzer/issues/9911))
###
[`v2.0.28`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.28)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.27...2.0.28)
- Fix inconsistency between full and non-full expression parse errors
([#​1491](https://redirect.github.com/dtolnay/syn/issues/1491))
###
[`v2.0.27`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.27)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.26...2.0.27)
- Documentation improvements (thanks
[@​GuillaumeGomez](https://redirect.github.com/GuillaumeGomez))
###
[`v2.0.26`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.26)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.25...2.0.26)
- Implement `Spanned` for `QSelf`
([#​1465](https://redirect.github.com/dtolnay/syn/issues/1465))
###
[`v2.0.25`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.25)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.24...2.0.25)
- Support single identifier as unbraced const generic argument
([#​1483](https://redirect.github.com/dtolnay/syn/issues/1483))
- Produce error message when LitStr::parse is used on a suffixed string
literal
([#​1484](https://redirect.github.com/dtolnay/syn/issues/1484))
###
[`v2.0.24`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.24)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.23...2.0.24)
- Fix duplication of braces around const generic argument in non-full
mode
([#​1482](https://redirect.github.com/dtolnay/syn/issues/1482))
###
[`v2.0.23`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.23)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.22...2.0.23)
- Preserve attributes on verbatim Item in statement position
([#​1476](https://redirect.github.com/dtolnay/syn/issues/1476))
- Support generic_const_exprs where-clauses such as `where [(); {
T::COUNT }]:` in non-"full" mode
([#​1478](https://redirect.github.com/dtolnay/syn/issues/1478))
###
[`v2.0.22`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.22)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.21...2.0.22)
- Parse `c"…"` c-string literals (tracking issue:
[https://github.com/rust-lang/rust/issues/105723](https://redirect.github.com/rust-lang/rust/issues/105723))
###
[`v2.0.21`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.21)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.20...2.0.21)
- Fix value computed by `LitByteStr::value` in the case of a cooked byte
string literal containing form feed or vertical tab characters following
an escaped newline
([#​1474](https://redirect.github.com/dtolnay/syn/issues/1474))
###
[`v2.0.20`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.20)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.19...2.0.20)
- Documentation improvements
###
[`v2.0.19`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.19)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.18...2.0.19)
- Improve rendering of compile errors within 2015-edition code calling a
2018+ edition proc macro
([#​1467](https://redirect.github.com/dtolnay/syn/issues/1467),
thanks
[@​danielhenrymantilla](https://redirect.github.com/danielhenrymantilla))
###
[`v2.0.18`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.18)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.17...2.0.18)
- Permit empty attr in syn::meta::parser
([#​1460](https://redirect.github.com/dtolnay/syn/issues/1460))
###
[`v2.0.17`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.17)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.16...2.0.17)
- Enable proc_macro support on wasm targets
([#​1459](https://redirect.github.com/dtolnay/syn/issues/1459))
###
[`v2.0.16`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.16)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.15...2.0.16)
- Parse `builtin #` syntax as Expr::Verbatim
([https://github.com/rust-lang/rust/issues/110680](https://redirect.github.com/rust-lang/rust/issues/110680),
[#​1454](https://redirect.github.com/dtolnay/syn/issues/1454))
###
[`v2.0.15`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.15)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.14...2.0.15)
- Ensure `Type::Tuple` of length 1 prints as a tuple even if trailing
comma is not provided in the Punctuated
([#​1444](https://redirect.github.com/dtolnay/syn/issues/1444),
thanks [@​Fancyflame](https://redirect.github.com/Fancyflame))
###
[`v2.0.14`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.14)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.13...2.0.14)
- Add Punctuated::pop_punct()
([#​1442](https://redirect.github.com/dtolnay/syn/issues/1442),
thanks
[@​programmerjake](https://redirect.github.com/programmerjake))
###
[`v2.0.13`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.13)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.12...2.0.13)
- Improve spans of Expr::Field parsed from a float Literal
([#​1433](https://redirect.github.com/dtolnay/syn/issues/1433),
[#​1436](https://redirect.github.com/dtolnay/syn/issues/1436))
###
[`v2.0.12`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.12)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.11...2.0.12)
- Refer to `compile_error!` by absolute path in token stream produced by
syn::Error::to_compile_error
([#​1431](https://redirect.github.com/dtolnay/syn/issues/1431),
thanks [@​smoelius](https://redirect.github.com/smoelius))
###
[`v2.0.11`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.11)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.10...2.0.11)
- Improve error message on empty parens inside parse_nested_meta
([#​1428](https://redirect.github.com/dtolnay/syn/issues/1428))
###
[`v2.0.10`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.10)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.9...2.0.10)
- Fix visibility being parsed incorrectly on macro invocations inside of
a trait
###
[`v2.0.9`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.9)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.8...2.0.9)
- Disallow `type` items in an extern block, trait, or module from being
marked `default`
- Disallow ImplItemFn from having an omitted function body, as in `impl
T { fn f(&self); }` — omitted function bodies are allowed by
TraitItemFn, but in `impl` blocks this syntax is now parsed as
ImplItem::Verbatim rather than ImplItem::Fn
###
[`v2.0.8`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.8)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.7...2.0.8)
- Treat `try` keyword as 2015-edition identifier in definition of try
macro
([#​1422](https://redirect.github.com/dtolnay/syn/issues/1422))
###
[`v2.0.7`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.7)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.6...2.0.7)
- Fix parsing of `mut self` inside of Type::BareFn
###
[`v2.0.6`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.6)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.5...2.0.6)
- Improve error message on missing ';' between statements
([#​1419](https://redirect.github.com/dtolnay/syn/issues/1419))
- Keep non-brace macro invocations in trailing expr position as
Expr::Macro
([#​1420](https://redirect.github.com/dtolnay/syn/issues/1420))
###
[`v2.0.5`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.5)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.4...2.0.5)
- Expose `ExprMacro` data structure even when `features="full"` is not
used
([#​1417](https://redirect.github.com/dtolnay/syn/issues/1417))
###
[`v2.0.4`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.4)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.3...2.0.4)
- Improve error reporting when parsing identifiers and paths
([#​1415](https://redirect.github.com/dtolnay/syn/issues/1415),
[#​1416](https://redirect.github.com/dtolnay/syn/issues/1416))
###
[`v2.0.3`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.3)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.2...2.0.3)
- Expose `ExprGroup` data structure even when `features="full"` is not
used
([#​1412](https://redirect.github.com/dtolnay/syn/issues/1412))
###
[`v2.0.2`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.2)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.1...2.0.2)
- Documentation improvements
###
[`v2.0.1`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.1)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/2.0.0...2.0.1)
- Add methods on syn::Meta for reporting error on an incorrect kind of
attribute
([#​1409](https://redirect.github.com/dtolnay/syn/issues/1409))
###
[`v2.0.0`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.0)
[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/1.0.109...2.0.0)
This release contains a batch of syntax tree improvements to incorporate
ongoing Rust language development from the past 3.5 years since syn 1.
It never seems like an ideal time to finalize a syntax tree design,
considering the frankly alarming number of syntax-disrupting language
features currently in flight: keyword generics, restrictions,
capabilities and contexts, conditional constness, new varieties of
literals, dyn revamp such as explicitly dyn-safe traits and dyn-star,
expression syntax in various phases of being added or being torn out
(const blocks, try blocks, raw references), auto traits and negative
impls, generalizations to higher rank trait bounds, async closures and
static async trait methods, postfix keywords, pattern types, return type
notation, unsafe attributes, …
The plan continues to be the same as laid out originally in the 1.0.0
release announcement:
> Be aware that the underlying Rust language will continue to evolve.
Syn is able to accommodate most kinds of Rust grammar changes via the
nonexhaustive enums and `Verbatim` variants in the syntax tree, but we
will plan to put out new major versions on a 12 to 24 month cadence to
incorporate ongoing language changes as needed.
If anything, the takeaway from the 3.5 year longevity of syn 1 is that
this period was tamer from a language development perspective than
anticipated, but that is unlikely to last and I think around 24 months
is still the correct cadence to expect between releases going forward.
<br>
<p align="center"><a href="https://docs.rs/syn/2/syn/">[API
documentation for 2.0]</a></p>
### Breaking changes
- Minimum required Rust version is raised from rustc 1.31 to 1.56.
##### Expressions
- Support for `box expr` syntax has been deleted, as it has been deleted
recently from rustc.
- Support for type ascription syntax `expr: Type` in expression position
has been deleted.
- Support for unstable `&raw const expr` raw-pointer reference syntax
has been deleted.
- The representation of generic arguments has been unified between
method calls and non-method paths into a single `GenericArgument` type,
which supersedes the previous `GenericMethodArgument` and
`MethodTurbofish`.
- Generic arguments now distinguish between associated types
(`AssocType`) and associated constant values (`AssocConst`). Previously
these would be parsed ambiguously as `Binding`.
- The binary assignment operators in `BinOp` have been renamed to align
with the naming used by the standard library's `core::ops` module's
traits. For example `BinOp::AddEq` is now called `BinOp::AddAssign`.
- `Expr::Struct` struct construction expressions now support structs
which are a variant of an enum associated type of a trait, as in `<Type
as Trait>::Assoc::Variant { ... }`, which has recently been added to
Rust.
- `Expr::Range` now follows the `start` and `end` naming used by the
standard library's `RangeBounds` trait, rather than `from`/`to` or
`lo`/`hi`.
- `Expr::AssignOp` has been merged into `Expr::Binary`, which now
represents both non-assignment and assignment binary operators.
- Stricter parsing of ranges. None of the following are valid
expressions, but were previously accepted by syn: `..=`, `lo..=`, `...`,
`...hi`, `lo...`, `lo...hi`.
- `Expr::Closure` now includes a representation for `for<...>`
lifetimes.
##### Statements
- Variants `Stmt::Expr` (tail-position expression without trailing
semicolon) and `Stmt::Semi` (non-tail expression with trailing
semicolon) have been combined into `Stmt::Expr` with the optional
semicolon represented by `Option<Token![;]>`.
- The syntax tree for `Stmt::Local` has been extended to handle
`let`/`else` syntax.
- Macros in statement position are now uniformly parsed as
`Stmt::Macro`. Previously these would be disambiguated to `Stmt::Item`,
although it was ambiguous whether a macro in statement position would
expand to an item (like `thread_local! { ... }`) vs an expression (like
`println! { ... }`).
##### Patterns
- Pattern parsing for all the different syntactic positions in which
patterns are allowed has been split into `Pat::parse_single` (for
function- and closure-argument position, where top-level `|` is not
allowed), `Pat::parse_multi` (where `|` is allowed) and
`Pat::parse_multi_with_leading_vert` (for the pattern of match arms,
which allow an optional leading `|`). Previously only a single `parse`
behavior was supported and behaved like the new `parse_single`.
- The `Pat` syntax tree now shares more common data structures with the
`Expr` syntax tree where possible, such as for literals, paths, macros,
and ranges in pattern position.
- Parsing of struct field patterns does a better job rejecting bogus
syntax such as `Struct { 0 asdf }` and `Struct { ref mut 0: asdf }`,
which were previously incorrectly accepted.
- `Pat::Range` now supports one-sided ranges by representing the start
and end bound of the range by `Option<Expr>`.
- `Pat::Struct` keeps track of attributes on the optional `..` "rest"
part of the pattern, as in `let Struct { x, #[cfg(any())] .. } = _;`.
- Parsing unary negation now enforces that only literal patterns can be
unarily negated. For example `-self::CONST` and `-const { 0i32 }` are
not valid syntax in pattern position.
- `Pat::TupleStruct` no longer wraps a value of type `PatTuple` but
represents that information in its fields directly.
- A single parenthesized pattern without trailing comma inside the
parentheses is no longer considered a `Pat::Tuple`, it will be parsed as
`Pat::Paren`.
- One-sided range patterns are no longer allowed inside of slice
patterns. `[lo..]` and `[..=hi]` are not considered valid pattern syntax
by Rust.
##### Items
- Typed `self` in a method signature, such as `self: Pin<&mut Self>`,
will now be parsed as `FnArg::Receiver`. This means `self`, whether with
or without an explicit type, is always treated as a `Receiver`.
Previously only the `&self` and `&mut self` shorthand receivers were
parsed as `Receiver`.
- `TraitItem::Method` and `ImplItem::Method` have been renamed to
`TraitItem::Fn` and `ImplItem::Fn`, as they do not necessarily represent
methods if the function signature contains no `self`.
- `Item::Macro2` has been deleted as "macros 2.0" syntax is no longer
considered on track for stabilization.
- Various item kinds now hold `Generics` which didn't used to have them.
- The variadic argument of an extern function signature can now be given
an optional parameter name.
- `WherePredicate::Eq` is no longer supported.
- `Visibility::Crate` is no longer supported. This syntax has been
removed from rustc.
- Public visibility is now represented by a single `Token![pub]` token
rather than the old `VisPublic` struct.
- `LifetimeDef` is now called `LifetimeParam`. This name makes more
sense in the context of the `GenericParam` enum (which also includes
`TypeParam` and `ConstParam`), and is the name that the Rust Reference
uses.
- Modules and extern blocks (`Item::Mod` and `Item::ForeignMod`) can now
be marked `unsafe`.
##### Attributes
- The syntax tree for `Attribute` has been redesigned. The new API
better accommodates attributes which mix structured and unstructured
content at different levels of nesting.
- `AttributeArgs` has been removed. Use `Punctuated<Meta, Token![,]>`.
- For parsing attribute contents, `parse_meta()` is superseded by a new
parsing library called `syn::meta`, and the `parse_nested_meta` method
on `Attribute`.
##### Tokens
- In string literals, the handling of non-ASCII whitespace after
trailing `\` now matches what is implemented by rustc. Space, horizontal
tab, line feed, and carriage return are the only 4 whitespace characters
which are supposed to be stripped from the beginning of the next line.
- The delimiter tokens `syn::token::Paren`, `Bracket`, and `Brace` now
store 2 spans (the open and close punctuation separately) rather than
just 1. Use `.join()` to obtain a single `Span` spanning the whole
group.
- Keyword construction now requires a single span; an array of 1 span is
no longer accepted. Use `Token` instead of
`Token`.
- Some token types have been renamed to conform with terminology used by
the [Rust
Reference](https://doc.rust-lang.org/1.68.0/reference/tokens.html#punctuation).
These are `Add`->`Plus`, `Bang`->`Not`, `Colon2`->`PathSep`,
`Div`->`Slash`, `Dot2`->`DotDot`, `Dot3`->`DotDotDot`, `Rem`->`Percent`,
and `Sub`->`Minus`.
##### More
- Several enums have been made `#[non_exhaustive]` in anticipation of
upcoming language changes. This includes `WherePredicate`, `Lit`, and
`GenericArgument`.
- The `impl Extend<Pair<T, P>> for Punctuated<T, P>` now requires `P:
Default` and will push a default punctuation between the pre-existing
elements and the new ones, if there is not already a trailing
punctuation. Previously it would panic in this situation.
- `ParseStream::parse_terminated` now takes a peek-style punctuation
argument instead of turbofish. Replace `input.parse_terminated::<_,
Token![,]>(Thing::parse)` with `input.parse_terminated(Thing::parse,
Token![,])`.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/get-eventually/eventually-rs).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Danilo Cianfrone <danilocianfr@gmail.com>1 parent 4a56f62 commit f8c735e
File tree
6 files changed
+16
-21
lines changed- eventually-macros
- src
- eventually-postgres/tests
- examples/bank-accounting/src
6 files changed
+16
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments