aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-06-21 12:03:01 -0700
committerJoel Galenson <jgalenson@google.com>2021-06-21 12:03:01 -0700
commit4ebb468d535ec1c8165f4baab632f36b1a563470 (patch)
treee7eecfdaa9eed24cd5cc12b56d199c6b1fe56e63
parentbff925ca5eca06cc5a5a796d474b3d6fd834c4db (diff)
downloadanyhow-4ebb468d535ec1c8165f4baab632f36b1a563470.tar.gz
Upgrade rust/crates/anyhow to 1.0.41
Test: make Change-Id: I8cc278d04d8dbd668171badb8fdb89566014e514
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml4
-rw-r--r--Cargo.toml.orig4
-rw-r--r--METADATA6
-rw-r--r--TEST_MAPPING9
-rw-r--r--src/error.rs6
-rw-r--r--src/lib.rs2
-rw-r--r--tests/ui/no-impl.stderr2
9 files changed, 13 insertions, 24 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 694bf81..adab937 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "704622f25d098b9e9925b93fbe2540745ff73f92"
+ "sha1": "b4f670dbe35b2a960f137da8b3ba89d6eb3c71cc"
}
}
diff --git a/Android.bp b/Android.bp
index b449703..1255d71 100644
--- a/Android.bp
+++ b/Android.bp
@@ -293,7 +293,7 @@ rust_library {
// serde-1.0.126 "default,derive,serde_derive,std"
// serde_derive-1.0.126 "default"
// serde_json-1.0.64 "default,std"
-// syn-1.0.72 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote"
+// syn-1.0.73 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote"
// termcolor-1.1.2
// thiserror-1.0.25
// thiserror-impl-1.0.25
diff --git a/Cargo.toml b/Cargo.toml
index 09c3dbf..bf9b18f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "anyhow"
-version = "1.0.40"
+version = "1.0.41"
authors = ["David Tolnay <dtolnay@gmail.com>"]
description = "Flexible concrete Error type built on std::error::Error"
documentation = "https://docs.rs/anyhow"
@@ -25,7 +25,7 @@ repository = "https://github.com/dtolnay/anyhow"
rustdoc-args = ["--cfg", "doc_cfg"]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies.backtrace]
-version = "0.3"
+version = "0.3.51"
optional = true
[dev-dependencies.futures]
version = "0.3"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index dca266a..92042b9 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "anyhow"
-version = "1.0.40" # remember to update html_root_url
+version = "1.0.41" # remember to update html_root_url
authors = ["David Tolnay <dtolnay@gmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
@@ -15,7 +15,7 @@ default = ["std"]
std = []
[dependencies]
-backtrace = { version = "0.3", optional = true }
+backtrace = { version = "0.3.51", optional = true }
[dev-dependencies]
futures = { version = "0.3", default-features = false }
diff --git a/METADATA b/METADATA
index f03d462..cb3b27d 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/anyhow/anyhow-1.0.40.crate"
+ value: "https://static.crates.io/crates/anyhow/anyhow-1.0.41.crate"
}
- version: "1.0.40"
+ version: "1.0.41"
license_type: NOTICE
last_upgrade_date {
year: 2021
month: 6
- day: 3
+ day: 21
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6e73b0a..b221cf6 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,9 +2,6 @@
{
"presubmit": [
{
- "name": "ZipFuseTest"
- },
- {
"name": "anyhow_device_test_src_lib"
},
{
@@ -41,9 +38,6 @@
"name": "anyhow_device_test_tests_test_source"
},
{
- "name": "authfs_device_test_src_lib"
- },
- {
"name": "doh_unit_test"
},
{
@@ -56,9 +50,6 @@
"name": "keystore2_test"
},
{
- "name": "microdroid_manager_test"
- },
- {
"name": "vpnprofilestore_test"
}
]
diff --git a/src/error.rs b/src/error.rs
index f4f5bc2..92bb63d 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -741,12 +741,11 @@ unsafe fn context_chain_downcast<C>(e: Ref<ErrorImpl>, target: TypeId) -> Option
where
C: 'static,
{
+ let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref();
if TypeId::of::<C>() == target {
- let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref();
Some(Ref::new(&unerased._object.context).cast::<()>())
} else {
// Recurse down the context chain per the inner error's vtable.
- let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref();
let source = &unerased._object.error;
(vtable(source.inner.ptr).object_downcast)(source.inner.by_ref(), target)
}
@@ -758,12 +757,11 @@ unsafe fn context_chain_downcast_mut<C>(e: Mut<ErrorImpl>, target: TypeId) -> Op
where
C: 'static,
{
+ let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref_mut();
if TypeId::of::<C>() == target {
- let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref_mut();
Some(Mut::new(&mut unerased._object.context).cast::<()>())
} else {
// Recurse down the context chain per the inner error's vtable.
- let unerased = e.cast::<ErrorImpl<ContextError<C, Error>>>().deref_mut();
let source = &mut unerased._object.error;
(vtable(source.inner.ptr).object_downcast_mut)(source.inner.by_mut(), target)
}
diff --git a/src/lib.rs b/src/lib.rs
index d6d70cf..5ff891c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -209,7 +209,7 @@
//! will require an explicit `.map_err(Error::msg)` when working with a
//! non-Anyhow error type inside a function that returns Anyhow's error type.
-#![doc(html_root_url = "https://docs.rs/anyhow/1.0.40")]
+#![doc(html_root_url = "https://docs.rs/anyhow/1.0.41")]
#![cfg_attr(backtrace, feature(backtrace))]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]
diff --git a/tests/ui/no-impl.stderr b/tests/ui/no-impl.stderr
index a4a829b..976b62c 100644
--- a/tests/ui/no-impl.stderr
+++ b/tests/ui/no-impl.stderr
@@ -18,4 +18,4 @@ error[E0599]: the method `anyhow_kind` exists for reference `&Error`, but its tr
which is required by `&Error: anyhow::private::kind::AdhocKind`
`&Error: Into<anyhow::Error>`
which is required by `&Error: anyhow::private::kind::TraitKind`
- = 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 `anyhow` (in Nightly builds, run with -Z macro-backtrace for more info)