about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-02-01 22:30:09 +0100
committerMara Bos <m-ou.se@m-ou.se>2021-02-03 22:42:53 +0100
commita616f8267ed9b9c45cdef81346e98aae06a70990 (patch)
tree1a0067599ada3571732f0d6b7dba7c93ec59820c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent120b2a704a60d4341286bd82f6e638c65ca169b6 (diff)
downloadrust-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