Skip to content

Commit 0f292e7

Browse files
Nemo157cramertj
authored andcommitted
Future is now object safe
1 parent 4bfa613 commit 0f292e7

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

futures-core/src/future/future_obj.rs

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ use core::{
1212
/// This custom trait object was introduced for two reasons:
1313
/// - Currently it is not possible to take `dyn Trait` by value and
1414
/// `Box<dyn Trait>` is not available in no_std contexts.
15-
/// - The `Future` trait is currently not object safe: The `Future::poll`
16-
/// method makes uses the arbitrary self types feature and traits in which
17-
/// this feature is used are currently not object safe due to current compiler
18-
/// limitations. (See tracking issue for arbitrary self types for more
19-
/// information #44874)
2015
pub struct LocalFutureObj<'a, T> {
2116
ptr: *mut (),
2217
poll_fn: unsafe fn(*mut (), &LocalWaker) -> Poll<T>,

futures-core/src/stream/stream_obj.rs

-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ use core::pin::Pin;
1111
/// This custom trait object was introduced for two reasons:
1212
/// - Currently it is not possible to take `dyn Trait` by value and
1313
/// `Box<dyn Trait>` is not available in no_std contexts.
14-
/// - The `Stream` trait is currently not object safe: The `Stream::poll_next`
15-
/// method makes uses the arbitrary self types feature and traits in which
16-
/// this feature is used are currently not object safe due to current compiler
17-
/// limitations. (See tracking issue for arbitrary self types for more
18-
/// information #44874)
1914
pub struct LocalStreamObj<'a, T> {
2015
ptr: *mut (),
2116
poll_next_fn: unsafe fn(*mut (), &LocalWaker) -> Poll<Option<T>>,

0 commit comments

Comments
 (0)