Snap for 10447354 from 7aa878004d2c1554a2bfe337c06a351d9dfd5742 to mainline-wifi-release

Change-Id: Id077a308f1ba23e83de09701b8080df071aa8a96
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 68eac09..1c4f96f 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "25167758af1fcbb8f5ee00c8d8097a50269635f5"
+    "sha1": "fdc19f7f0c5590dcd003982144b9af772829c654"
   },
   "path_in_vcs": "zeroize/derive"
 }
\ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 25551b4..6e10664 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,6 @@
 // This file is generated by cargo2android.py --config cargo2android.json.
 // Do not modify this file as changes will be overridden on upgrade.
 
-
-
 package {
     default_applicable_licenses: [
         "external_rust_crates_zeroize_derive_license",
@@ -26,7 +24,7 @@
     name: "libzeroize_derive",
     crate_name: "zeroize_derive",
     cargo_env_compat: true,
-    cargo_pkg_version: "1.3.2",
+    cargo_pkg_version: "1.3.3",
     srcs: ["src/lib.rs"],
     edition: "2018",
     rustlibs: [
@@ -36,4 +34,26 @@
         "libsynstructure",
     ],
     compile_multilib: "first",
+    product_available: true,
+    vendor_available: true,
+}
+
+rust_test_host {
+    name: "zeroize_derive_test_src_lib",
+    crate_name: "zeroize_derive",
+    cargo_env_compat: true,
+    cargo_pkg_version: "1.3.3",
+    srcs: ["src/lib.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
+    edition: "2018",
+    rustlibs: [
+        "libproc_macro2",
+        "libquote",
+        "libsyn",
+        "libsynstructure",
+    ],
 }
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ecaef2..4191342 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## 1.3.3 (2022-11-30)
+### Fixed
+- Deriving `ZeroizeOnDrop` on items with generics ([#787])
+
+[#787]: https://github.com/RustCrypto/utils/pull/787
+
 ## 1.3.2 (2022-02-18)
 ### Fixed
 - Min versions build ([#732])
@@ -25,7 +31,7 @@
 [#699]: https://github.com/RustCrypto/utils/pull/699
 [#700]: https://github.com/RustCrypto/utils/pull/700
 
-## 1.2.2 (2021-11-04)
+## 1.2.2 (2021-11-04) [YANKED]
 ### Added
 - `#[zeroize(skip)]` attribute ([#654])
 
@@ -35,12 +41,12 @@
 ### Changed
 - Moved to `RustCrypto/utils` repository
 
-## 1.2.0 (2021-09-21)
+## 1.2.0 (2021-09-21) [YANKED]
 ### Changed
 - Bump MSRV to 1.51+
 - Reject `#[zeroize(drop)]` on struct/enum fields, enum variants
 
-## 1.1.1 (2021-10-09)
+## 1.1.1 (2021-10-09) [YANKED]
 ### Changed
 - Backport 1.2.0 `#[zeroize(drop)]` fixes but with a 1.47+ MSRV.
 
diff --git a/Cargo.toml b/Cargo.toml
index 2cb23a0..167ed6c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,19 +12,32 @@
 [package]
 edition = "2018"
 name = "zeroize_derive"
-version = "1.3.2"
+version = "1.3.3"
 authors = ["The RustCrypto Project Developers"]
 description = "Custom derive support for zeroize"
 readme = "README.md"
-keywords = ["memory", "memset", "secure", "volatile", "zero"]
-categories = ["cryptography", "memory-management", "no-std", "os"]
+keywords = [
+    "memory",
+    "memset",
+    "secure",
+    "volatile",
+    "zero",
+]
+categories = [
+    "cryptography",
+    "memory-management",
+    "no-std",
+    "os",
+]
 license = "Apache-2.0 OR MIT"
 repository = "https://github.com/RustCrypto/utils/tree/master/zeroize/derive"
+
 [package.metadata.docs.rs]
 rustdoc-args = ["--document-private-items"]
 
 [lib]
 proc-macro = true
+
 [dependencies.proc-macro2]
 version = "1"
 
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 4bac91a..c33fbcf 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
 [package]
 name = "zeroize_derive"
 description = "Custom derive support for zeroize"
-version = "1.3.2"
+version = "1.3.3"
 authors = ["The RustCrypto Project Developers"]
 license = "Apache-2.0 OR MIT"
 repository = "https://github.com/RustCrypto/utils/tree/master/zeroize/derive"
diff --git a/LICENSE-MIT b/LICENSE-MIT
new file mode 100644
index 0000000..4281628
--- /dev/null
+++ b/LICENSE-MIT
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019-2021 The RustCrypto Project Developers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/METADATA b/METADATA
index 3ec5f4c..a8d03ae 100644
--- a/METADATA
+++ b/METADATA
@@ -1,3 +1,7 @@
+# This project was upgraded with external_updater.
+# Usage: tools/external_updater/updater.sh update rust/crates/zeroize_derive
+# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+
 name: "zeroize_derive"
 description: "Custom derive support for zeroize"
 third_party {
@@ -7,14 +11,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/zeroize_derive/zeroize_derive-1.3.2.crate"
+    value: "https://static.crates.io/crates/zeroize_derive/zeroize_derive-1.3.3.crate"
   }
-  version: "1.3.2"
-  # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same.
+  version: "1.3.3"
   license_type: NOTICE
   last_upgrade_date {
     year: 2022
-    month: 9
-    day: 6
+    month: 12
+    day: 19
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..5f54cfa
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,17 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+  "imports": [
+    {
+      "path": "external/rust/crates/zeroize"
+    },
+    {
+      "path": "external/uwb/src"
+    },
+    {
+      "path": "system/keymint/derive"
+    },
+    {
+      "path": "system/keymint/hal"
+    }
+  ]
+}
diff --git a/cargo2android.json b/cargo2android.json
index 58e46ee..2e184ce 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
 {
   "host-first-multilib": true,
+  "tests": true,
   "run": true
 }
diff --git a/src/lib.rs b/src/lib.rs
index 1efc3b4..baf6990 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -71,7 +71,7 @@
 fn derive_zeroize_on_drop(mut s: synstructure::Structure<'_>) -> TokenStream {
     let zeroizers = generate_fields(&mut s, quote! { zeroize_or_on_drop });
 
-    let drop_impl = s.gen_impl(quote! {
+    let drop_impl = s.add_bounds(AddBounds::None).gen_impl(quote! {
         gen impl Drop for @Self {
             fn drop(&mut self) {
                 use zeroize::__internal::AssertZeroize;