#debug #debugging #source #file #line

source_loc

utility for capturing source file location at compile time

1 unstable release

0.99.0 Jan 15, 2020

#19 in #source

MIT/Apache

8KB

Crates.io Crates.io

source_loc

Utility for capturing source file location at compile time. Much less overhead than Backtrace, but, of course you don't get a full backtrace.

Example

use source_loc::source_loc;

let loc = source_loc!();
assert_eq!(
    "src/lib.rs:6:11",
    &loc.to_string(),
);

lib.rs:

Utility for capturing source file location at compile time. Much less overhead than Backtrace, but, of course you don't get a full backtrace.

Example

use source_loc::source_loc;

let loc = source_loc!();
assert_eq!(
    "src/lib.rs:6:11",
    &loc.to_string(),
);

No runtime deps