I'm finding that the nightly version of Rust is newly flagging unused results for tuples of empty tuples. Here's an example:
#[tokio::main]
async fn main() {
futures::future::join(futures::future::ready(()), futures::future::ready(())).await;
}
When built with
$ echo $RUSTFLAGS
-Dunused_results
$ rustc --version
rustc 1.95.0-nightly (1ed488274 2026-02-25)
Will generate the following error:
error: unused result of type `((), ())`
--> src/main.rs:5:5
|
5 | futures::future::join(futures::future::ready(()), futures::future::ready(())).await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I suspect this is due to this recent change. It's not clear to me whether this is an intended behavior change or an unintended side effect.
I'm finding that the nightly version of Rust is newly flagging unused results for tuples of empty tuples. Here's an example:
When built with
Will generate the following error:
I suspect this is due to this recent change. It's not clear to me whether this is an intended behavior change or an unintended side effect.