non_fmt_panic warns on 2021 for external macros #88142
Labels
A-edition-2021
Area: The 2021 edition
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
I've noticed that
non_fmt_panic
will raise a warning in 2021 for external macros in some cases. #87965 silenced the case involving a non-string payload, but there are still warnings for strings with braces. I don't think there is anything the caller can do to fix the warning (other than silencing it).I tried this code:
With the macro defined as either macro_rules or proc-macro:
Or defined as a proc-macro:
I expected to see this happen: There (probably?) shouldn't be a warning if there is nothing the caller can do.
Instead, this happened: Warning is emitted.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: