Closed
Description
I tried this code:
use sqlx::sqlite::Sqlite;
const DB_URI: &str = "sqlite://data/db.sqlite";
async fn test() {
// this returns a futures_core::future::BoxFuture, which does not warn upon compilation if unused
Sqlite::create_database(DB_URI);
}
I expected to see this happen:
Normally, the unused_must_use
lint would warn regarding the unused future. In this case there's no warning (perhaps because the original function has no warning, but since there's a blanket warning for async
functions I'd expect one here).
Instead, this happened:
No warning was emitted
Meta
rustc --version --verbose
:
rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: aarch64-apple-darwin
release: 1.60.0
LLVM version: 14.0.0
See playground here