Expand description
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(),
);
Macros§
- source_
loc - Captures a SourceLoc source location.
Structs§
- Source
Loc - A captured source location. To capture, use the source_loc!() macro.