macro

print! — Print without a trailing newline

Use print! when consecutive output should appear on the same line. Stdout can be buffered; for a prompt before input, explicitly flush stdout with std::io::Write::flush and handle its result. Expression result: (). Expected result (not executed): stdout: 'Order: 27\n'; no stderr. Common mistake: Assuming text without a newline appears immediately on every output destination.

Formal Syntax & Structure

rust syntaxrust
print!("format string", arguments...)

Working Example

Example Snippetrust
fn main() {    print!("Order: ");    println!("{}", 27);}
Rust Reference