RS.CLIPPY.PRINTLN_EMPTY_STRING

Using `println!(\"\")` with an empty string

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

What it does

This lint warns when you use println!("") to print a newline.

Why is this bad?

You should use println!(), which is simpler.

Example

println!("");

Use instead:

println!();