Skip to content

Commit

Permalink
core/any: remove Provider trait
Browse files Browse the repository at this point in the history
* remove `impl Provider for Error`
* rename `Demand` to `Request`
* update docstrings to focus on the conceptual API provided by `Request`
* move `core::any::{request_ref, request_value}` functions into `core::error`
* move `core::any::tag`, `core::any::Request`, an `core::any::TaggedOption` into `core::error`
* replace `provide_any` feature name w/ `error_generic_member_access`
* move `core::error::request_{ref,value} tests into core::tests::error module
* update unit and doc tests
  • Loading branch information
waynr committed Aug 13, 2023
1 parent 19a2c92 commit 8f3d34c
Show file tree
Hide file tree
Showing 10 changed files with 736 additions and 739 deletions.
1 change: 0 additions & 1 deletion alloc/src/lib.rs
Expand Up @@ -138,7 +138,6 @@
#![feature(maybe_uninit_uninit_array_transpose)]
#![feature(pattern)]
#![feature(pointer_byte_offsets)]
#![feature(provide_any)]
#![feature(ptr_internals)]
#![feature(ptr_metadata)]
#![feature(ptr_sub_ptr)]
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/sync.rs
Expand Up @@ -3575,7 +3575,7 @@ impl<T: core::error::Error + ?Sized> core::error::Error for Arc<T> {
core::error::Error::source(&**self)
}

fn provide<'a>(&'a self, req: &mut core::any::Demand<'a>) {
fn provide<'a>(&'a self, req: &mut core::error::Request<'a>) {
core::error::Error::provide(&**self, req);
}
}

0 comments on commit 8f3d34c

Please sign in to comment.