Skip to content

Improvement: enable inline named args #25

@arkjedrz

Description

@arkjedrz

This is currently not supported by macros, due to invalid span being used.
Right now: mw_log_format_args!("{}", x1).
Expected: mw_log_format_args!("{x1}").

Additional notes, 11.12.2025:
This is not possible to do with proc-macros nested inside declarative macros.
E.g., error! declarative macro from mw_log calls mw_log_format_args! procedural macro.
It is possible to change span inside proc macro to call site, but this means span is at declarative macro, which provides fixed mixed-site span. Created identifier is then not being able to access external variable.

One option would be to rewrite all mw_log macros to proc macros, but this might be a larger effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions