RS.CLIPPY.UNIT_ARG

Passing unit to a function

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: unit_arg. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for passing a unit value as an argument to a function without using a unit literal (()).

Why is this bad?

This is likely the result of an accidental semicolon.

Example

foo({
    let a = bar();
    baz(a);
})