mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
16 lines
285 B
Rust
16 lines
285 B
Rust
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
|
|
#![deny(should_assert_eq)]
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
struct NonDebug(i32);
|
|
|
|
#[derive(Debug, PartialEq, Eq)]
|
|
struct Debug(i32);
|
|
|
|
fn main() {
|
|
assert!(1 == 2);
|
|
assert!(Debug(1) == Debug(2));
|
|
assert!(NonDebug(1) == NonDebug(1)); // ok
|
|
}
|