Commit 5c69052
committed
chore(deps): update rust crate syn to v3 (#2300)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [syn](https://redirect.github.com/dtolnay/syn) | workspace.dependencies | major | `2` → `3` |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/1486) for more information.
**Cargo major update** — Before merging, verify the workspace compiles and check upstream release notes for removed features or API changes.
---
### Release Notes
<details>
<summary>dtolnay/syn (syn)</summary>
### [`v3.0.3`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.3)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.2...3.0.3)
- Documentation improvements
### [`v3.0.2`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.2)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.1...3.0.2)
- Add [`Error::new_range(start..end, "msg")`](https://docs.rs/syn/3/syn/struct.Error.html#method.new_range) ([#​2068](https://redirect.github.com/dtolnay/syn/issues/2068), [#​2070](https://redirect.github.com/dtolnay/syn/issues/2070))
- Add [`Cursor::prev_span`](https://docs.rs/syn/3/syn/buffer/struct.Cursor.html#method.prev_span)
### [`v3.0.1`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.1)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/3.0.0...3.0.1)
- Parse const traits ([#​2056](https://redirect.github.com/dtolnay/syn/issues/2056), [#​2057](https://redirect.github.com/dtolnay/syn/issues/2057), [#​2058](https://redirect.github.com/dtolnay/syn/issues/2058), [#​2063](https://redirect.github.com/dtolnay/syn/issues/2063), [#​2064](https://redirect.github.com/dtolnay/syn/issues/2064))
- Parse unsafe binder types ([#​2065](https://redirect.github.com/dtolnay/syn/issues/2065))
- Parse impl restrictions ([#​2066](https://redirect.github.com/dtolnay/syn/issues/2066))
### [`v3.0.0`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.0)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.119...3.0.0)
This release contains adjustments to the syntax tree to account for ongoing Rust language development from the 3 years since syn 2.0.0 and to anticipate some in-flight Rust language RFCs.
These include: default values in fields, pinned type sugar, raw lifetimes, generator blocks and functions, unnamed enum variants, attributes in tuple types and tuple patterns, named arguments in parenthesized generic argument lists, lightweight clones, const traits, const function pointers, mutability restricted fields, supertrait auto implementation, final associated functions, trait implementability restrictions, const blocks in path arguments, item-level const blocks, return type notation, never patterns, function delegation, mutable by-reference bindings, in-place initialization, field projections, explicitly dyn-compatible traits, view types, file-level frontmatter, generic const arguments, guard patterns, lazy type aliases, explicitly safe foreign items, super let, unsafe fields, pattern types, heterogeneous try-blocks, function contracts, async function trait bounds, static closure coroutine syntax, unsafe binder types, move expressions, for-await loops, and postfix keywords.
<br>
<p align="center"><a href="https://docs.rs/syn/3/syn">[API documentation for 3.0]</a></p>
### Breaking changes
#### Modifiers
To reserve more room for language evolution, there are 10 new non-exhaustive structs in the syntax tree having the following commonality:
- Name ending in `Modifiers`. {`BlockModifiers`, `ClosureModifiers`, `ConstModifiers`, `FieldModifiers`, `FnModifiers`, `ImplModifiers`, `LocalModifiers`, `TraitBoundModifiers`, `TraitModifiers`, `TypeModifiers`}
- Each implements `Default`. The default value is guaranteed to comprise no tokens.
- Non-exhaustive. Can only be instantiated by Syn's parser or by creating and then mutating `▁▁Modifiers::default()`.
- Does not implement `Parse`. When parsing, they are parsed by the enclosing syntax tree node.
- Does not implement `ToTokens`. In some cases the syntax that these nodes might hold in the future is not necessarily contiguous tokens.
- Provides `.require_empty() -> Result<()>` which returns a meaningfully spanned error if the modifiers are different from the empty default. This enables a caller to reject syntax it does not recognize without knowing what that syntax may be.
#### Types
- `Type::BareFn` has been renamed to `Type::FnPtr` to mirror the compiler's terminology. Together with this, `BareVariadic` is renamed to `FnPtrVariadic`.
- The mutually exclusive `const_token` and `mutability` fields of `Type::Ptr` have been unified into an enum of type `PointerMutability`, which was already previously used by `Expr::RawAddr`.
- Every `Type` variant now holds attributes, which can represent the attributes of element types inside a tuple type, or attributes for a function return type.
- `BareFnArg` is renamed to `NamedArg` and is used in `ParenthesizedGenericArguments`, in addition to the existing use in `Type::FnPtr`.
#### Expressions
- In `Expr::Closure`, the fields `or1_token` and `or2_token` have been renamed to `inputs_begin` and `inputs_end` to indicate the beginning and ending `|` token of the closure inputs.
#### Statements
- Attributes are now preserved on all expression kinds in statement position. Previously, parsing would silently lose attributes on some expression statements without a dedicated Expr variant, such as tail-call expressions.
#### Patterns
- The `guard` field of `Arm` is replaced by a new `Pat::Guard` variant held in the arm's `pat`.
#### Items
- The `unsafety` field of `Signature`, which represented the presence or absence of `unsafe`, is replaced by a 3-way `Safety` enum which may be safe, unsafe, or default. `ForeignItem::Static` also gets a `Safety`.
- Some of the fields of `Receiver` have been split to a non-exhaustive `ReceiverKind` enum to create room for proposed new kinds of method receivers, such as pinned.
- Type aliases now hold a `WhereClausePlacement` to distinguish between early placement (which is the default for item-level type aliases and is *deprecated* in associated type aliases) and late placement (which is the default for associated type aliases and is *unstable* in item-level type aliases). Parsing and printing a syntax tree will now preserve the where-clause placement rather than rewriting it to the default placement for the item kind.
#### Generics
- `WherePredicate::Lifetime` and `WherePredicate::Type` have a new field holding the attributes on the where-predicates.
- `GenericParam::Type` and `GenericParam::Const` now match the rest of the syntax tree in holding their optional default using a single Option of tuple, rather than a pair of Option.
#### Literals
- The `Parse` implementation of `Lifetime` no longer permits keyword lifetimes, matching a change in Rust 1.81 to deny such lifetimes pre-expansion. `Lifetime::parse_any` may be used to parse lifetimes permissive of keywords.
- `LitInt` and `LitFloat` no longer implement `From<proc_macro2::Literal>`. Use `Lit::new(literal)` and then match `Lit::Int` or `Lit::Float`.
- The `StrStyle` enum was unused and has been deleted.
#### More
- `File` contains a new `Option<Frontmatter>`, but does not yet parse frontmatter in `syn::parse_file` until that language feature progresses closer to stabilization.
- Some enums no longer provide `From` impls. Construct the variant by name instead, such as `Expr::Array(e)` in place of `e.into()`.
- The `pop` method of `Punctuated<T, P>` now returns `Option<T>` discarding the trailing punctuation if any, rather than `Option<Pair<T, P>>`. A new method `pop_pair` provides the old behavior.
- Syntax tree traversal (`visit`, `visit_mut`, `fold`) no longer provides a method for processing `Span`. This was already incompletely supported and never walked most of the spans in a syntax tree.
- The `Speculative` and `AnyDelimiter` traits have been sealed and cannot be implemented for types outside of Syn's `ParseStream`.
### [`v2.0.119`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.119)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.118...2.0.119)
- Preserve attributes on tail-call expressions in statement position ([#​1994](https://redirect.github.com/dtolnay/syn/issues/1994))
- Parse field-representing types builtin in type position ([#​1996](https://redirect.github.com/dtolnay/syn/issues/1996))
### [`v2.0.118`](https://redirect.github.com/dtolnay/syn/releases/tag/2.0.118)
[Compare Source](https://redirect.github.com/dtolnay/syn/compare/2.0.117...2.0.118)
- Documentation improvements
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, 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/DataDog/saluki).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNC4wIiwidXBkYXRlZEluVmVyIjoiNDQuMjQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: jszwedko <jesse.szwedko@datadoghq.com> 9ee5a4d1 parent 99603d5 commit 5c69052
748 files changed
Lines changed: 3824 additions & 3824 deletions
File tree
- agent-data-plane
- configuration
- api-docs
- containerd_protos
- events
- container_create
- services
- containers
- v1
- containers_client
- container
- content
- v1
- content_client
- diff
- v1
- diff_client
- events
- v1
- events_client
- images
- v1
- images_client
- introspection
- v1
- introspection_client
- leases
- v1
- leases_client
- namespaces
- v1
- namespaces_client
- sandbox
- v1
- controller_client
- store_client
- snapshots
- v1
- snapshots_client
- streaming
- v1
- streaming_client
- tasks
- v1
- tasks_client
- transfer
- v1
- transfer_client
- version
- v1
- version_client
- types
- sandbox
- transfer
- v1
- types
- datadog_protos
- agent
- config_event
- flare
- v1
- flare_provider_client
- flare_provider_server
- generate_container_id_from_origin_info_request
- status
- v1
- status_provider_client
- status_provider_server
- telemetry
- v1
- get_telemetry_response
- telemetry_provider_client
- telemetry_provider_server
- v1
- event
- remote_agent_client
- remote_agent_server
- checks
- check_data
- checks_client
- checks_server
- event
- log
- metric
- service_check
- events
- metrics
- events_payload
- metric_payload
- sketch_payload
- sketch
- v3
- sketches
- index_mapping
- traces
- attribute_any_value
- attribute_array_value
- builders
- attribute_any_value
- attribute_array_value
- idx
- otlp_protos/opentelemetry
- proto
- collector
- logs
- v1
- logs_service_client
- logs_service_server
- metrics
- v1
- metrics_service_client
- metrics_service_server
- trace
- v1
- trace_service_client
- trace_service_server
- common
- v1
- any_value
- logs
- v1
- metrics
- v1
- exemplar
- exponential_histogram_data_point
- metric
- number_data_point
- summary_data_point
- resource
- v1
- trace
- v1
- span
- status
- src
- containerd_protos/home/runner/work/saluki/saluki/target/debug/build/containerd-protos-6ce73341396723e8/out
- datadog_protos/home/runner/work/saluki/saluki/target/debug/build/datadog-protos-5f75f5308154b0d0/out
- protos
- sketch_protos
- trace_piecemeal/datadog
- trace
- trace_protos
- otlp_protos/home/runner/work/saluki/saluki/target/debug/build/otlp-protos-4a881bcc63023378/out
- assets
- chunks
- development
- reference
- adrs
- records
- architecture
- proposals
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
0 commit comments