Skip to content
masterclass Buddy

Rust · Macro

println!

println! prints formatted text to standard output and adds a newline. It supports the same formatting syntax as format!.

Last updated

Since
1.0.0

Syntax

macro_rules! println { () => { ... }; ($($arg:tt)*) => { ... }; }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • format!
  • eprintln!
  • std::fmt
  • std::io::stdout
  • std::io::Write
  • writeln!

Source: println in std - Rust. Checked 2026-11-03.