diff --git a/tokio-test/src/task.rs b/tokio-test/src/task.rs index a9cf50f52f9..812f908aca8 100644 --- a/tokio-test/src/task.rs +++ b/tokio-test/src/task.rs @@ -49,6 +49,7 @@ pub fn spawn(task: T) -> Spawn { /// Future spawned on a mock task that can be used to poll the future or stream /// without needing pinning or context types. #[derive(Debug)] +#[must_use = "futures do nothing unless you `.await` or poll them"] pub struct Spawn { task: MockTask, future: Pin>,