Skip to content

Upgrading futures 0.1 to 0.3

Breaking0.1.31 → 0.3.34Breaking18Platform4Deprecated3New92Changed26Fixed40Other18

BreakingUpgrade verdict

18 breaking changes and 4 platform requirement changes.

  • Remove dependency to pin-utils.
  • Remove dependency on num_cpus.
  • Remove build scripts.
  • Remove Fut::Output: Clone bounds from some Shared methods.
Top 5 of 25 that need code or config changes

Requires Rust 1.71 from 0.3.32 (none stated before).

Breaking18
Remove dependency to pin-utils.
pin-utils
Remove dependency on num_cpus.
num_cpus
Remove build scripts.
Remove Fut::Output: Clone bounds from some Shared methods.
Shared
Remove T: Debug bounds from Debug implementations of mpsc and oneshot types.
Debugmpsconeshot
Remove Unpin bound from TryStreamExt::into_async_read.
UnpinTryStreamExt::into_async_read
Remove unstable read-initializer feature.
read-initializer
Removed the Send bound on the output of RemoteHandle.
SendRemoteHandle
Removed ThreadPool::run.
ThreadPool::run
Removed BufReader::poll_seek_relative.
BufReader::poll_seek_relative
Removed Stream impl for VecDeque.
StreamVecDeque
Renamed Peekable::peek to poll_peek.
Peekable::peekpoll_peek
Renamed oneshot::Sender::poll_cancel to poll_canceled.
oneshot::Sender::poll_cancelpoll_canceled
Fix soundness bug in task::waker_ref This is a breaking change but allowed because it is soundness bug fix.
task::waker_ref
Fix parsing issue in select!/select_biased!
select!select_biased!
Fixed type-inference in sink::unfold by specifying more of its types (breaking change -- see ).
sink::unfold
Removed and replaced a large amount of internal unsafe.
unsafe
Fix signature of LocalSpawn trait (breaking change -- see ).
LocalSpawn
Platform4
Bump MSRV of utility crates to 1.71.
Update to syn 2. This raises MSRV of utility crates to 1.56.
Fix stacked borrows violations when -Zmiri-tag-raw-pointers is enabled.
-Zmiri-tag-raw-pointersfutures-task
Remove dependency on proc-macro-hack.
proc-macro-hack
Deprecated3
Soft-deprecate ready! macro in favor of std::task::ready! added in Rust 1.64.
ready!std::task::ready!
Soft-deprecate pin_mut! macro in favor of std::pin::pin! added in Rust 1.68.
pin_mut!std::pin::pin!
Deprecate FuturesOrdered::push in favor of FuturesOrdered::push_back.
FuturesOrdered::pushFuturesOrdered::push_back