mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
22 lines
311 B
Rust
22 lines
311 B
Rust
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
|
|
#[deny(panic_params)]
|
|
|
|
fn missing() {
|
|
panic!("{}"); //~ERROR: You probably are missing some parameter
|
|
}
|
|
|
|
fn ok_sigle() {
|
|
panic!("foo bar");
|
|
}
|
|
|
|
fn ok_multiple() {
|
|
panic!("{}", "This is {ok}");
|
|
}
|
|
|
|
fn main() {
|
|
missing();
|
|
ok_sigle();
|
|
ok_multiple();
|
|
}
|