| commit | 971a9d6cf188b485af1dd1a03171f74e15fbf6cc | [log] [tgz] |
|---|---|---|
| author | Matthew Maurer <mmaurer@google.com> | Tue Apr 04 16:44:35 2023 +0000 |
| committer | Matthew Maurer <mmaurer@google.com> | Tue Apr 04 16:44:35 2023 +0000 |
| tree | 9fbee739478ab8ee4dc64d2187be48e387832841 | |
| parent | c6d5e8bd97ec5c74df8022a6d67af0b20a34fd32 [diff] |
Update to syn-2 This patch is unlikely to land upstream as is, since it requires that the `full` feature be enabled on syn, and the primary purpose of `syn-mid` is to avoid the `full` feature. Since we build with `full` anyways, this is a non-issue for us. Bug: 276463929 Test: m Change-Id: I8a54139a5644c3cfd8e8989f4ed2e2e2242bf06b
Providing the features between “full” and “derive” of syn.
This crate provides the following two unique data structures.
syn_mid::ItemFn -- A function whose body is not parsed.
fn process(n: usize) -> Result<()> { ... } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^
syn_mid::Block -- A block whose body is not parsed.
{ ... } ^ ^
Other data structures are the same as data structures of syn. These are defined in this crate because they cannot be used in syn without “full” feature.
Add this to your Cargo.toml:
[dependencies] syn-mid = "0.5"
Compiler support: requires rustc 1.31+
clone-impls — Clone impls for all syntax tree types.Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.