Upgrade rust/crates/thiserror to 1.0.25

Test: make
Change-Id: If65cc840f54901ed2874343075cf7cb2b40f4323
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 349cbda..bc886ab 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "1b0a84996b9492c0dc5779127a91c930f23a259e"
+    "sha1": "19cb5cee4b51203f6801daa3ff0185761d0d3d4c"
   }
 }
diff --git a/Android.bp b/Android.bp
index b0525ae..9212d3b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -51,8 +51,8 @@
 }
 
 // dependent_library ["feature_list"]
-//   proc-macro2-1.0.26 "default,proc-macro"
+//   proc-macro2-1.0.27 "default,proc-macro"
 //   quote-1.0.9 "default,proc-macro"
-//   syn-1.0.71 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
-//   thiserror-impl-1.0.24
-//   unicode-xid-0.2.1 "default"
+//   syn-1.0.73 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
+//   thiserror-impl-1.0.25
+//   unicode-xid-0.2.2 "default"
diff --git a/Cargo.toml b/Cargo.toml
index e3ef65a..011dab7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "thiserror"
-version = "1.0.24"
+version = "1.0.25"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 description = "derive(Error)"
 documentation = "https://docs.rs/thiserror"
@@ -24,7 +24,7 @@
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 [dependencies.thiserror-impl]
-version = "=1.0.24"
+version = "=1.0.25"
 [dev-dependencies.anyhow]
 version = "1.0"
 
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 0517a91..136c938 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "thiserror"
-version = "1.0.24"
+version = "1.0.25"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 edition = "2018"
 license = "MIT OR Apache-2.0"
@@ -11,7 +11,7 @@
 readme = "README.md"
 
 [dependencies]
-thiserror-impl = { version = "=1.0.24", path = "impl" }
+thiserror-impl = { version = "=1.0.25", path = "impl" }
 
 [dev-dependencies]
 anyhow = "1.0"
diff --git a/METADATA b/METADATA
index 3b9f5d5..f99aa6d 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/thiserror/thiserror-1.0.24.crate"
+    value: "https://static.crates.io/crates/thiserror/thiserror-1.0.25.crate"
   }
-  version: "1.0.24"
+  version: "1.0.25"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 2
-    day: 18
+    month: 6
+    day: 21
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index c21ac98..254a499 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,52 +2,55 @@
 {
   "presubmit": [
     {
-      "name": "anyhow_device_test_tests_test_repr"
-    },
-    {
-      "name": "keystore2_test"
-    },
-    {
-      "name": "anyhow_device_test_tests_test_context"
-    },
-    {
-      "name": "libsqlite3-sys_device_test_src_lib"
-    },
-    {
-      "name": "anyhow_device_test_tests_test_downcast"
-    },
-    {
-      "name": "keystore2_crypto_test_rust"
-    },
-    {
-      "name": "anyhow_device_test_tests_test_convert"
-    },
-    {
-      "name": "anyhow_device_test_tests_test_ffi"
+      "name": "anyhow_device_test_src_lib"
     },
     {
       "name": "anyhow_device_test_tests_test_autotrait"
     },
     {
-      "name": "anyhow_device_test_tests_test_macros"
-    },
-    {
       "name": "anyhow_device_test_tests_test_boxed"
     },
     {
       "name": "anyhow_device_test_tests_test_chain"
     },
     {
-      "name": "anyhow_device_test_src_lib"
+      "name": "anyhow_device_test_tests_test_context"
     },
     {
-      "name": "anyhow_device_test_tests_test_source"
+      "name": "anyhow_device_test_tests_test_convert"
+    },
+    {
+      "name": "anyhow_device_test_tests_test_downcast"
+    },
+    {
+      "name": "anyhow_device_test_tests_test_ffi"
     },
     {
       "name": "anyhow_device_test_tests_test_fmt"
     },
     {
+      "name": "anyhow_device_test_tests_test_macros"
+    },
+    {
+      "name": "anyhow_device_test_tests_test_repr"
+    },
+    {
+      "name": "anyhow_device_test_tests_test_source"
+    },
+    {
+      "name": "keystore2_crypto_test_rust"
+    },
+    {
+      "name": "keystore2_selinux_concurrency_test"
+    },
+    {
       "name": "keystore2_selinux_test"
+    },
+    {
+      "name": "keystore2_test"
+    },
+    {
+      "name": "vpnprofilestore_test"
     }
   ]
 }
diff --git a/src/aserror.rs b/src/aserror.rs
index 8290296..f440034 100644
--- a/src/aserror.rs
+++ b/src/aserror.rs
@@ -1,33 +1,33 @@
 use std::error::Error;
 
-pub trait AsDynError {
-    fn as_dyn_error(&self) -> &(dyn Error + 'static);
+pub trait AsDynError<'a> {
+    fn as_dyn_error(&self) -> &(dyn Error + 'a);
 }
 
-impl<T: Error + 'static> AsDynError for T {
+impl<'a, T: Error + 'a> AsDynError<'a> for T {
     #[inline]
-    fn as_dyn_error(&self) -> &(dyn Error + 'static) {
+    fn as_dyn_error(&self) -> &(dyn Error + 'a) {
         self
     }
 }
 
-impl AsDynError for dyn Error + 'static {
+impl<'a> AsDynError<'a> for dyn Error + 'a {
     #[inline]
-    fn as_dyn_error(&self) -> &(dyn Error + 'static) {
+    fn as_dyn_error(&self) -> &(dyn Error + 'a) {
         self
     }
 }
 
-impl AsDynError for dyn Error + Send + 'static {
+impl<'a> AsDynError<'a> for dyn Error + Send + 'a {
     #[inline]
-    fn as_dyn_error(&self) -> &(dyn Error + 'static) {
+    fn as_dyn_error(&self) -> &(dyn Error + 'a) {
         self
     }
 }
 
-impl AsDynError for dyn Error + Send + Sync + 'static {
+impl<'a> AsDynError<'a> for dyn Error + Send + Sync + 'a {
     #[inline]
-    fn as_dyn_error(&self) -> &(dyn Error + 'static) {
+    fn as_dyn_error(&self) -> &(dyn Error + 'a) {
         self
     }
 }
diff --git a/tests/test_source.rs b/tests/test_source.rs
index 860e727..ab16097 100644
--- a/tests/test_source.rs
+++ b/tests/test_source.rs
@@ -60,4 +60,8 @@
 }
 
 // Test that we generate impls with the proper hygiene
-error_from_macro!(#[error("Something")] Variant(#[from] io::Error));
+#[rustfmt::skip]
+error_from_macro! {
+    #[error("Something")]
+    Variant(#[from] io::Error)
+}
diff --git a/tests/test_transparent.rs b/tests/test_transparent.rs
index b862b25..84d7c91 100644
--- a/tests/test_transparent.rs
+++ b/tests/test_transparent.rs
@@ -57,3 +57,24 @@
     assert_eq!("outer", error.to_string());
     assert_eq!("inner", error.source().unwrap().to_string());
 }
+
+#[test]
+fn test_non_static() {
+    #[derive(Error, Debug)]
+    #[error(transparent)]
+    struct Error<'a> {
+        inner: ErrorKind<'a>,
+    }
+
+    #[derive(Error, Debug)]
+    enum ErrorKind<'a> {
+        #[error("unexpected token: {:?}", token)]
+        Unexpected { token: &'a str },
+    }
+
+    let error = Error {
+        inner: ErrorKind::Unexpected { token: "error" },
+    };
+    assert_eq!("unexpected token: \"error\"", error.to_string());
+    assert!(error.source().is_none());
+}
diff --git a/tests/ui/concat-display.stderr b/tests/ui/concat-display.stderr
index df1e19a..a009145 100644
--- a/tests/ui/concat-display.stderr
+++ b/tests/ui/concat-display.stderr
@@ -7,4 +7,4 @@
 13 | error_type!(Error, "foo");
    | -------------------------- in this macro invocation
    |
-   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `error_type` (in Nightly builds, run with -Z macro-backtrace for more info)