Open
Description
Description
let res = returns_unit();
returns_result(res).unwrap();
println!("The result is {res:?}");
The suggestion of above code is
help: omit the `let` binding and replace variable usages with `()`
|
22 ~ returns_unit();
23 ~ returns_result(()).unwrap();
24 ~ println!("The result is {():?}");
But println!("The result is {():?}");
is not valid.
Version
rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: aarch64-apple-darwin
release: 1.86.0
LLVM version: 19.1.7
Additional Labels
No response