Skip to content

Commit

Permalink
Future is now object safe
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 authored and cramertj committed Nov 26, 2018
1 parent 4bfa613 commit 0f292e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions futures-core/src/future/future_obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ use core::{
/// This custom trait object was introduced for two reasons:
/// - Currently it is not possible to take `dyn Trait` by value and
/// `Box<dyn Trait>` is not available in no_std contexts.
/// - The `Future` trait is currently not object safe: The `Future::poll`
/// method makes uses the arbitrary self types feature and traits in which
/// this feature is used are currently not object safe due to current compiler
/// limitations. (See tracking issue for arbitrary self types for more
/// information #44874)
pub struct LocalFutureObj<'a, T> {
ptr: *mut (),
poll_fn: unsafe fn(*mut (), &LocalWaker) -> Poll<T>,
Expand Down
5 changes: 0 additions & 5 deletions futures-core/src/stream/stream_obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ use core::pin::Pin;
/// This custom trait object was introduced for two reasons:
/// - Currently it is not possible to take `dyn Trait` by value and
/// `Box<dyn Trait>` is not available in no_std contexts.
/// - The `Stream` trait is currently not object safe: The `Stream::poll_next`
/// method makes uses the arbitrary self types feature and traits in which
/// this feature is used are currently not object safe due to current compiler
/// limitations. (See tracking issue for arbitrary self types for more
/// information #44874)
pub struct LocalStreamObj<'a, T> {
ptr: *mut (),
poll_next_fn: unsafe fn(*mut (), &LocalWaker) -> Poll<Option<T>>,
Expand Down

0 comments on commit 0f292e7

Please sign in to comment.