rust-lang/rust-clippy

Lint for unused empty function value

Open

#15.957 aperta il 26 ott 2025

Vedi su GitHub
 (10 commenti) (0 reazioni) (1 assegnatario)Rust (1391 fork)batch import
C-bugI-false-negativegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 16g 6h) (79 PR mergiate in 30 g)

Descrizione

What it does

Suggests turning let _unused = returns_nothing(); to returns_nothing();

Advantage

Increases code hygiene

Drawbacks

None

Example

let _unused: () = returns_nothing();

Could be written as:

returns_nothing();

Comparison with existing lints

No similar lints were found

Additional Context

A quick Github search shows around 116 thousand instances of the aforementioned example

Guida contributor