aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-02 05:17:14 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-02 05:17:14 +0000
commit427ce407505705e7b096ea053fd5d5293dc03c55 (patch)
tree7f93672eb3892c4a2f2a0585aa024bf134d25ca2
parent14993f9a1c28aeae72a3306a868fea665666119b (diff)
parent8be8b9f6db8595f9cc9f6fe379dd4ec9f606895d (diff)
downloadsyn-427ce407505705e7b096ea053fd5d5293dc03c55.tar.gz
Snap for 9553927 from 8be8b9f6db8595f9cc9f6fe379dd4ec9f606895d to udc-d1-release
Change-Id: I0a2a86c0851e0c82eaf5c2db1d644dd58cebaf9f
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml5
-rw-r--r--Cargo.toml.orig5
-rw-r--r--METADATA6
-rw-r--r--README.md2
-rw-r--r--TEST_MAPPING272
-rw-r--r--src/lib.rs2
-rw-r--r--tests/common/eq.rs2
-rw-r--r--tests/test_expr.rs70
10 files changed, 61 insertions, 307 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 160deecc..649e893c 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "998e86375ba16fe76a89faa13e00a11177965bfd"
+ "sha1": "4168f6bbdf91a01b24e893c451dd726ecddd88d2"
},
"path_in_vcs": ""
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 2c84eab9..99f27b9f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,7 @@ rust_library_host {
name: "libsyn",
crate_name: "syn",
cargo_env_compat: true,
- cargo_pkg_version: "1.0.105",
+ cargo_pkg_version: "1.0.107",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
diff --git a/Cargo.toml b/Cargo.toml
index 34962a9c..c2a36013 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.31"
name = "syn"
-version = "1.0.105"
+version = "1.0.107"
authors = ["David Tolnay <dtolnay@gmail.com>"]
include = [
"/benches/**",
@@ -56,6 +56,9 @@ features = [
"extra-traits",
]
+[lib]
+doc-scrape-examples = false
+
[[bench]]
name = "rust"
harness = false
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 38a2b888..dd32f92d 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "syn"
-version = "1.0.105" # don't forget to update html_root_url and syn.json
+version = "1.0.107" # don't forget to update html_root_url and syn.json
authors = ["David Tolnay <dtolnay@gmail.com>"]
categories = ["development-tools::procedural-macro-helpers", "parser-implementations"]
description = "Parser for Rust source code"
@@ -54,6 +54,9 @@ tar = "0.4.16"
termcolor = "1.0"
walkdir = "2.1"
+[lib]
+doc-scrape-examples = false
+
[[bench]]
name = "rust"
harness = false
diff --git a/METADATA b/METADATA
index 888529c8..2fa7d2c9 100644
--- a/METADATA
+++ b/METADATA
@@ -11,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/syn/syn-1.0.105.crate"
+ value: "https://static.crates.io/crates/syn/syn-1.0.107.crate"
}
- version: "1.0.105"
+ version: "1.0.107"
license_type: NOTICE
last_upgrade_date {
year: 2022
month: 12
- day: 7
+ day: 22
}
}
diff --git a/README.md b/README.md
index 9c883ae2..eeef83dd 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Parser for Rust source code
[<img alt="github" src="https://img.shields.io/badge/github-dtolnay/syn-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/syn)
[<img alt="crates.io" src="https://img.shields.io/crates/v/syn.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/syn)
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-syn-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/syn)
-[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/syn/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/syn/actions?query=branch%3Amaster)
+[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/syn/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/dtolnay/syn/actions?query=branch%3Amaster)
Syn is a parsing library for parsing a stream of Rust tokens into a syntax tree
of Rust source code.
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 9d0f6de4..7c468927 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -102,298 +102,66 @@
},
{
"path": "external/rust/crates/zeroize"
- }
- ],
- "presubmit": [
- {
- "name": "VtsAidlDiceDemoteTargetTest"
- },
- {
- "name": "VtsAidlDiceTargetTest"
- },
- {
- "name": "ZipFuseTest"
- },
- {
- "name": "apkdmverity.test"
- },
- {
- "name": "authfs_device_test_src_lib"
- },
- {
- "name": "avmdtool.test"
- },
- {
- "name": "avmdtool_tests"
- },
- {
- "name": "bluetooth_with_facades.test"
- },
- {
- "name": "compos_verify.test"
- },
- {
- "name": "composd_cmd.test"
- },
- {
- "name": "diced_open_dice_cbor_test"
- },
- {
- "name": "diced_sample_inputs_test"
- },
- {
- "name": "diced_test"
- },
- {
- "name": "diced_utils_test"
- },
- {
- "name": "diced_vendor_test"
- },
- {
- "name": "doh_unit_test"
- },
- {
- "name": "encryptedstore.test"
- },
- {
- "name": "fd_server.test"
- },
- {
- "name": "keystore2_client_tests"
- },
- {
- "name": "keystore2_crypto_test_rust"
- },
- {
- "name": "keystore2_km_compat_test"
- },
- {
- "name": "keystore2_legacy_blobs_test"
- },
- {
- "name": "keystore2_selinux_concurrency_test"
- },
- {
- "name": "keystore2_selinux_test"
- },
- {
- "name": "keystore2_test"
- },
- {
- "name": "keystore2_test_utils_test"
- },
- {
- "name": "keystore2_vintf_test"
- },
- {
- "name": "legacykeystore_test"
- },
- {
- "name": "libapexutil_rust.test"
- },
- {
- "name": "libapkverify.integration_test"
- },
- {
- "name": "libapkverify.test"
- },
- {
- "name": "libdm_rust.test"
- },
- {
- "name": "libkmr_derive_test"
- },
- {
- "name": "libkmr_hal_test"
- },
- {
- "name": "libpvmfw_avb.integration_test"
- },
- {
- "name": "librustutils_test"
- },
- {
- "name": "libtombstoned_client_rust_test"
- },
- {
- "name": "libuwb_adaptation_jni_tests"
- },
- {
- "name": "libuwb_core_tests"
- },
- {
- "name": "libuwb_uci_jni_rust_tests"
- },
- {
- "name": "libuwb_uci_packet_tests"
- },
- {
- "name": "microdroid_manager_test"
- },
- {
- "name": "open_then_run.test"
- },
- {
- "name": "rialto_test"
- },
- {
- "name": "rustBinderTest"
- },
- {
- "name": "virtualizationmanager_device_test"
- },
- {
- "name": "vm.test"
- },
- {
- "name": "vmbase_example.integration_test"
- }
- ],
- "presubmit-rust": [
- {
- "name": "VtsAidlDiceDemoteTargetTest"
- },
- {
- "name": "VtsAidlDiceTargetTest"
- },
- {
- "name": "ZipFuseTest"
- },
- {
- "name": "apkdmverity.test"
- },
- {
- "name": "authfs_device_test_src_lib"
- },
- {
- "name": "avmdtool.test"
- },
- {
- "name": "avmdtool_tests"
- },
- {
- "name": "bluetooth_with_facades.test"
- },
- {
- "name": "compos_verify.test"
- },
- {
- "name": "composd_cmd.test"
- },
- {
- "name": "diced_open_dice_cbor_test"
- },
- {
- "name": "diced_sample_inputs_test"
- },
- {
- "name": "diced_test"
- },
- {
- "name": "diced_utils_test"
- },
- {
- "name": "diced_vendor_test"
- },
- {
- "name": "doh_unit_test"
- },
- {
- "name": "encryptedstore.test"
- },
- {
- "name": "fd_server.test"
- },
- {
- "name": "keystore2_client_tests"
- },
- {
- "name": "keystore2_crypto_test_rust"
- },
- {
- "name": "keystore2_km_compat_test"
- },
- {
- "name": "keystore2_legacy_blobs_test"
- },
- {
- "name": "keystore2_selinux_concurrency_test"
- },
- {
- "name": "keystore2_selinux_test"
- },
- {
- "name": "keystore2_test"
- },
- {
- "name": "keystore2_test_utils_test"
- },
- {
- "name": "keystore2_vintf_test"
- },
- {
- "name": "legacykeystore_test"
},
{
- "name": "libapexutil_rust.test"
+ "path": "external/uwb/src"
},
{
- "name": "libapkverify.integration_test"
+ "path": "packages/modules/DnsResolver"
},
{
- "name": "libapkverify.test"
+ "path": "packages/modules/Virtualization/apkdmverity"
},
{
- "name": "libdm_rust.test"
+ "path": "packages/modules/Virtualization/authfs"
},
{
- "name": "libkmr_derive_test"
+ "path": "packages/modules/Virtualization/avmd"
},
{
- "name": "libkmr_hal_test"
+ "path": "packages/modules/Virtualization/encryptedstore"
},
{
- "name": "libpvmfw_avb.integration_test"
+ "path": "packages/modules/Virtualization/libs/apexutil"
},
{
- "name": "librustutils_test"
+ "path": "packages/modules/Virtualization/libs/apkverify"
},
{
- "name": "libtombstoned_client_rust_test"
+ "path": "packages/modules/Virtualization/libs/devicemapper"
},
{
- "name": "libuwb_adaptation_jni_tests"
+ "path": "packages/modules/Virtualization/microdroid_manager"
},
{
- "name": "libuwb_core_tests"
+ "path": "packages/modules/Virtualization/virtualizationmanager"
},
{
- "name": "libuwb_uci_jni_rust_tests"
+ "path": "packages/modules/Virtualization/vm"
},
{
- "name": "libuwb_uci_packet_tests"
+ "path": "packages/modules/Virtualization/zipfuse"
},
{
- "name": "microdroid_manager_test"
+ "path": "system/keymint/derive"
},
{
- "name": "open_then_run.test"
+ "path": "system/keymint/hal"
},
{
- "name": "rialto_test"
+ "path": "system/security/diced"
},
{
- "name": "rustBinderTest"
+ "path": "system/security/keystore2"
},
{
- "name": "virtualizationmanager_device_test"
+ "path": "system/security/keystore2/legacykeystore"
},
{
- "name": "vm.test"
+ "path": "system/security/keystore2/selinux"
},
{
- "name": "vmbase_example.integration_test"
+ "path": "system/security/keystore2/src/crypto"
}
]
}
diff --git a/src/lib.rs b/src/lib.rs
index 886de975..e47ba28c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -250,7 +250,7 @@
//! dynamic library libproc_macro from rustc toolchain.
// Syn types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/syn/1.0.105")]
+#![doc(html_root_url = "https://docs.rs/syn/1.0.107")]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![allow(non_camel_case_types)]
#![allow(
diff --git a/tests/common/eq.rs b/tests/common/eq.rs
index f060e735..41d6d411 100644
--- a/tests/common/eq.rs
+++ b/tests/common/eq.rs
@@ -518,7 +518,7 @@ spanless_eq_enum!(UintTy; Usize U8 U16 U32 U64 U128);
spanless_eq_enum!(UnOp; Deref Not Neg);
spanless_eq_enum!(Unsafe; Yes(0) No);
spanless_eq_enum!(UnsafeSource; CompilerGenerated UserProvided);
-spanless_eq_enum!(UseTreeKind; Simple(0 1 2) Nested(0) Glob);
+spanless_eq_enum!(UseTreeKind; Simple(0) Nested(0) Glob);
spanless_eq_enum!(VariantData; Struct(0 1) Tuple(0 1) Unit(0));
spanless_eq_enum!(VisibilityKind; Public Restricted(path id shorthand) Inherited);
spanless_eq_enum!(WherePredicate; BoundPredicate(0) RegionPredicate(0) EqPredicate(0));
diff --git a/tests/test_expr.rs b/tests/test_expr.rs
index 8fd911e2..e5b151fd 100644
--- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ -53,36 +53,37 @@ fn test_await() {
#[rustfmt::skip]
#[test]
fn test_tuple_multi_index() {
+ let expected = snapshot!("tuple.0.0" as Expr, @r###"
+ Expr::Field {
+ base: Expr::Field {
+ base: Expr::Path {
+ path: Path {
+ segments: [
+ PathSegment {
+ ident: "tuple",
+ arguments: None,
+ },
+ ],
+ },
+ },
+ member: Unnamed(Index {
+ index: 0,
+ }),
+ },
+ member: Unnamed(Index {
+ index: 0,
+ }),
+ }
+ "###);
+
for &input in &[
- "tuple.0.0",
"tuple .0.0",
"tuple. 0.0",
"tuple.0 .0",
"tuple.0. 0",
"tuple . 0 . 0",
] {
- snapshot!(input as Expr, @r###"
- Expr::Field {
- base: Expr::Field {
- base: Expr::Path {
- path: Path {
- segments: [
- PathSegment {
- ident: "tuple",
- arguments: None,
- },
- ],
- },
- },
- member: Unnamed(Index {
- index: 0,
- }),
- },
- member: Unnamed(Index {
- index: 0,
- }),
- }
- "###);
+ assert_eq!(expected, syn::parse_str(input).unwrap());
}
for tokens in vec![
@@ -93,28 +94,7 @@ fn test_tuple_multi_index() {
quote!(tuple.0. 0),
quote!(tuple . 0 . 0),
] {
- snapshot!(tokens as Expr, @r###"
- Expr::Field {
- base: Expr::Field {
- base: Expr::Path {
- path: Path {
- segments: [
- PathSegment {
- ident: "tuple",
- arguments: None,
- },
- ],
- },
- },
- member: Unnamed(Index {
- index: 0,
- }),
- },
- member: Unnamed(Index {
- index: 0,
- }),
- }
- "###);
+ assert_eq!(expected, syn::parse2(tokens).unwrap());
}
}