RS.CLIPPY.PRINT_WITH_NEWLINE

Using `print!()` with a format string that ends in a single newline

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

What it does

This lint warns when you use print!() with a format string that ends in a newline.

Why is this bad?

You should use println!() instead, which appends the newline.

Example

print!("Hello {}!\
", name);

use println!() instead

println!("Hello {}!", name);