rust/compiler/rustc_lint
Mara Bos a616f8267e Add lint for panic!(123) which is not accepted in Rust 2021.
This extends the `panic_fmt` lint to warn for all cases where the first
argument cannot be interpreted as a format string, as will happen in
Rust 2021.

It suggests to add `"{}", ` to format the message as a string. In the
case of `std::panic!()`, it also suggests the recently stabilized
`std::panic::panic_any()` function as an alternative.

It renames the lint to `non_fmt_panic` to match the lint naming
guidelines.
2021-02-03 22:42:53 +01:00
..
src Add lint for panic!(123) which is not accepted in Rust 2021. 2021-02-03 22:42:53 +01:00
Cargo.toml Parse the format string for the panic_fmt lint for better warnings. 2020-10-20 22:25:42 +02:00