non_fmt_panics suggestion breaks for some const functions #88429
Labels
A-edition-2021
Area: The 2021 edition
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
I tried this code:
This provides a suggestion to replace the code with:
However, this will not compile in a const function:
I'm not actually sure what the correct suggestion should be, since
panic_any
is not const.Found during the 2021 crater run for:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: