W3cubDocs

/Rust

Macro std::column

macro_rules! column {
    () => { ... };
}

A macro which expands to the column number on which it was invoked.

The expanded expression has type u32, and the returned column is not the invocation of the column!() macro itself, but rather the first macro invocation leading up to the invocation of the column!() macro.

Examples

let current_col = column!();
println!("defined on column: {}", current_col);

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/macro.column.html