PRBLEM / DEVELOPER RESOURCES

Rust println! macro

← Back to Code Library

RustBeginner

Print a formatted line.

When to use it

Use to display values while learning Rust.

Rust · Editable example
No visitor code executes on the WordPress server.
Edit this example or check its structure. For Python/SQL select Run for real browser-based output.

Expected output

Hello

Common mistake and fix

println! is a macro and needs !.

Related concepts: macros, ownership

Explain this code

Print a formatted line.

Educational examples are not a substitute for a real compiler or version-specific documentation. JavaScript, Python and SQLite demos run in isolated browser contexts when supported; Python and SQL load an online WebAssembly runtime on first use. Other languages receive structural hints, not compiler validation. No visitor code executes on WordPress.