rust-lang/rust-clippy

Lint for unused empty function value

オープン

#15,957 opened on 2025/10/26

 (10 件のコメント) (0 件のリアクション) (1 人の担当者)Rust (1,391 件のフォーク)batch import
C-bugI-false-negativegood first issue

Repository metrics

Stars
 (10,406 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド