diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-02-01 22:30:09 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-02-03 22:42:53 +0100 |
| commit | a616f8267ed9b9c45cdef81346e98aae06a70990 (patch) | |
| tree | 1a0067599ada3571732f0d6b7dba7c93ec59820c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 120b2a704a60d4341286bd82f6e638c65ca169b6 (diff) | |
| download | rust-a616f8267ed9b9c45cdef81346e98aae06a70990.tar.gz rust-a616f8267ed9b9c45cdef81346e98aae06a70990.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
