Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future is now object safe #1348

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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