Snap for 8730993 from bd0bc7be90d05d9978bfbd09c10cfb88f014cd55 to mainline-tzdata3-release

Change-Id: I582de511063673fb4cd5fb002806421b891eaebc
diff --git a/Android.bp b/Android.bp
index 305eede..e0d1ff8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,8 +23,6 @@
     // has rustc warnings
     host_supported: true,
     crate_name: "matches",
-    cargo_env_compat: true,
-    cargo_pkg_version: "0.1.9",
     srcs: ["lib.rs"],
     edition: "2015",
     apex_available: [
@@ -34,27 +32,34 @@
     min_sdk_version: "29",
 }
 
-rust_test {
-    name: "matches_test_lib",
-    // has rustc warnings
-    host_supported: true,
+rust_defaults {
+    name: "matches_defaults",
     crate_name: "matches",
-    cargo_env_compat: true,
-    cargo_pkg_version: "0.1.9",
+    // has rustc warnings
     srcs: ["lib.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
-    test_options: {
-        unit_test: true,
-    },
     edition: "2015",
 }
 
+rust_test_host {
+    name: "matches_host_test_lib",
+    defaults: ["matches_defaults"],
+    test_options: {
+        unit_test: true,
+    },
+}
+
+rust_test {
+    name: "matches_device_test_lib",
+    defaults: ["matches_defaults"],
+}
+
 rust_defaults {
-    name: "matches_test_defaults",
-    crate_name: "matches",
-    cargo_env_compat: true,
-    cargo_pkg_version: "0.1.9",
+    name: "matches_defaults_macro_use_one",
+    crate_name: "macro_use_one",
+    // has rustc warnings
+    srcs: ["tests/macro_use_one.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2015",
@@ -63,24 +68,15 @@
     ],
 }
 
-rust_test {
-    name: "matches_test_tests_macro_use_one",
-    defaults: ["matches_test_defaults"],
-    // has rustc warnings
-    host_supported: true,
-    srcs: ["tests/macro_use_one.rs"],
+rust_test_host {
+    name: "matches_host_test_tests_macro_use_one",
+    defaults: ["matches_defaults_macro_use_one"],
     test_options: {
         unit_test: true,
     },
 }
 
 rust_test {
-    name: "matches_test_tests_use_star",
-    defaults: ["matches_test_defaults"],
-    // has rustc warnings
-    host_supported: true,
-    srcs: ["tests/use_star.rs"],
-    test_options: {
-        unit_test: true,
-    },
+    name: "matches_device_test_tests_macro_use_one",
+    defaults: ["matches_defaults_macro_use_one"],
 }
diff --git a/Cargo.toml b/Cargo.toml
index 57a249a..030159e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g. crates.io) dependencies
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
@@ -12,7 +12,7 @@
 
 [package]
 name = "matches"
-version = "0.1.9"
+version = "0.1.8"
 authors = ["Simon Sapin <simon.sapin@exyr.org>"]
 description = "A macro to evaluate, as a boolean, whether an expression matches a pattern."
 documentation = "https://docs.rs/matches/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index bf12269..afc7422 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "matches"
-version = "0.1.9"
+version = "0.1.8"
 authors = ["Simon Sapin <simon.sapin@exyr.org>"]
 license = "MIT"
 repository = "https://github.com/SimonSapin/rust-std-candidates"
diff --git a/METADATA b/METADATA
index 5a786dc..2848b7a 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/matches/matches-0.1.9.crate"
+    value: "https://static.crates.io/crates/matches/matches-0.1.8.crate"
   }
-  version: "0.1.9"
+  version: "0.1.8"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2021
-    month: 9
-    day: 23
+    year: 2020
+    month: 12
+    day: 15
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 577d626..138b36c 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,39 +1,17 @@
-// Generated by update_crate_tests.py for tests that depend on this crate.
+// Generated by cargo2android.py for tests that depend on this crate.
 {
-  "imports": [
-    {
-      "path": "external/rust/crates/quiche"
-    },
-    {
-      "path": "external/rust/crates/url"
-    }
-  ],
   "presubmit": [
     {
-      "name": "doh_unit_test"
+      "name": "matches_device_test_lib"
     },
     {
-      "name": "matches_test_lib"
+      "name": "url_device_test_src_lib"
     },
     {
-      "name": "matches_test_tests_macro_use_one"
+      "name": "unicode-bidi_device_test_src_lib"
     },
     {
-      "name": "matches_test_tests_use_star"
-    }
-  ],
-  "presubmit-rust": [
-    {
-      "name": "doh_unit_test"
-    },
-    {
-      "name": "matches_test_lib"
-    },
-    {
-      "name": "matches_test_tests_macro_use_one"
-    },
-    {
-      "name": "matches_test_tests_use_star"
+      "name": "matches_device_test_tests_macro_use_one"
     }
   ]
 }
diff --git a/lib.rs b/lib.rs
index 01ccbf9..b183925 100644
--- a/lib.rs
+++ b/lib.rs
@@ -1,8 +1,3 @@
-#![no_std]
-
-// ANDROID: Use std to allow building as a dylib.
-extern crate std;
-
 /// Check if an expression matches a refutable pattern.
 ///
 /// Syntax: `matches!(` *expression* `,` *pattern* `)`
diff --git a/patches/std.diff b/patches/std.diff
deleted file mode 100644
index 371910c..0000000
--- a/patches/std.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/lib.rs b/lib.rs
-index 3bcd6e2..01ccbf9 100644
---- a/lib.rs
-+++ b/lib.rs
-@@ -1,5 +1,8 @@
- #![no_std]
- 
-+// ANDROID: Use std to allow building as a dylib.
-+extern crate std;
-+
- /// Check if an expression matches a refutable pattern.
- ///
- /// Syntax: `matches!(` *expression* `,` *pattern* `)`
diff --git a/tests/use_star.rs b/tests/use_star.rs
deleted file mode 100644
index 58a670b..0000000
--- a/tests/use_star.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//! https://github.com/SimonSapin/rust-std-candidates/issues/22
-
-extern crate matches;
-
-use matches::*;
-
-#[test]
-fn test_assert_matches() {
-    assert_matches!(4, 4)
-}