Macro location

Source
macro_rules! location {
    () => { ... };
    (context: $context:expr) => { ... };
    (function: $function:expr) => { ... };
    (context: $context:expr, function: $function:expr) => { ... };
    (function: $function:expr, context: $context:expr) => { ... };
}
Expand description

Macro to create a location at the current source position

This macro provides several forms:

  • location!() - Basic location with file, line, column
  • location!(context: "description") - Location with context description
  • location!(function: "fn_name") - Location with function name
  • location!(context: "desc", function: "fn_name") - Location with both