summaryrefslogtreecommitdiffstats
path: root/vendor/thiserror/src/provide.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/thiserror/src/provide.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/thiserror/src/provide.rs')
-rw-r--r--vendor/thiserror/src/provide.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/vendor/thiserror/src/provide.rs b/vendor/thiserror/src/provide.rs
index 524e7435d..7b4e92238 100644
--- a/vendor/thiserror/src/provide.rs
+++ b/vendor/thiserror/src/provide.rs
@@ -1,15 +1,20 @@
-use std::any::{Demand, Provider};
+use std::error::{Error, Request};
+#[doc(hidden)]
pub trait ThiserrorProvide: Sealed {
- fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>);
+ fn thiserror_provide<'a>(&'a self, request: &mut Request<'a>);
}
-impl<T: Provider + ?Sized> ThiserrorProvide for T {
+impl<T> ThiserrorProvide for T
+where
+ T: Error + ?Sized,
+{
#[inline]
- fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>) {
- self.provide(demand);
+ fn thiserror_provide<'a>(&'a self, request: &mut Request<'a>) {
+ self.provide(request);
}
}
+#[doc(hidden)]
pub trait Sealed {}
-impl<T: Provider + ?Sized> Sealed for T {}
+impl<T: Error + ?Sized> Sealed for T {}