Skip to content

Is it possible to disable a lint for all macro invocations? #11472

@pitdicker

Description

@pitdicker

Description

Is there a way to suppress a lint (zero_prefixed_literal in my case) for all invocations of a macro?

For chrono (chronotope/chrono#1270) I am trying to write macros that can be used as

time!(7:03:25);

But that generates warnings (https://github.com/chronotope/chrono/actions/runs/6119764599/job/16610345590?pr=1270)

I am looking for a solution that doesn't require users to disable the lint. Maybe it can be solved by adjusting the macro, I just don't know enough about this part of Rust yet.

Version

No response

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions