mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
22 lines
307 B
Rust
22 lines
307 B
Rust
|
//@no-rustfix
|
||
|
#![deny(clippy::should_panic_without_expect)]
|
||
|
|
||
|
#[test]
|
||
|
#[should_panic]
|
||
|
fn no_message() {}
|
||
|
|
||
|
#[test]
|
||
|
#[should_panic]
|
||
|
#[cfg(not(test))]
|
||
|
fn no_message_cfg_false() {}
|
||
|
|
||
|
#[test]
|
||
|
#[should_panic = "message"]
|
||
|
fn metastr() {}
|
||
|
|
||
|
#[test]
|
||
|
#[should_panic(expected = "message")]
|
||
|
fn metalist() {}
|
||
|
|
||
|
fn main() {}
|