Skip to content

Wrong span used in non_fmt_panic lint for panic!(a!()) #82109

Closed
@m-ou-se

Description

@m-ou-se

The non_fmt_panic lint points inside the definition of a in:

panic!(a!())

Because the argument of panic!() is entirely a!(), we get the span inside of as definition. We should walk up the macro backtrace to find the span of a!() itself in this snippet.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsD-papercutDiagnostics: An error or lint that needs small tweaks.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions