source_loc

Crates.iosource_loc
lib.rssource_loc
version0.99.0
sourcesrc
created_at2020-01-15 22:08:45.526626
updated_at2020-01-15 22:08:45.526626
descriptionutility for capturing source file location at compile time
homepage
repositoryhttps://github.com/neonphog/source_loc
max_upload_size
id198869
size18,462
David Braden (neonphog)

documentation

https://docs.rs/source_loc

README

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(),
);
Commit count: 2

cargo fmt