code_location

Macro code_location 

Source
macro_rules! code_location {
    () => { ... };
}
Expand description

Expands to the CodeLocation on which it was invoked.

ยงExamples

use code_location::code_location;

println!("I am printing from {}", code_location!());
assert_eq!(code_location!().to_string(), "src/lib.rs:7:12");