rust-lang/rust-clippy

Lint for unused empty function value

Open

#15.957 aberto em 26 de out. de 2025

Ver no GitHub
 (10 comments) (0 reactions) (1 assignee)Rust (1.391 forks)batch import
C-bugI-false-negativegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 16d 6h) (79 fundiu PRs em 30d)

Description

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

Guia do colaborador