rust/library/core
Mara Bos 87b269ab66
Rollup merge of #81645 - m-ou-se:panic-lint, r=estebank,flip1995
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.

![image](https://user-images.githubusercontent.com/783247/106520928-675ea680-64d5-11eb-81f7-d8fa48b93a0b.png)

This is part of #80162.

r? ```@estebank```
2021-02-04 21:10:36 +01:00
..
benches Add more benchmarks 2021-01-08 09:50:35 +00:00
src Rollup merge of #81645 - m-ou-se:panic-lint, r=estebank,flip1995 2021-02-04 21:10:36 +01:00
tests stabilize int_bits_const 2021-01-31 21:50:47 +10:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00