2015-08-19 06:54:20 +02:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
|
|
|
|
2017-05-17 14:19:44 +02:00
|
|
|
#![warn(unit_cmp)]
|
2016-05-13 16:43:47 +02:00
|
|
|
#![allow(no_effect, unnecessary_operation)]
|
2015-08-19 06:54:20 +02:00
|
|
|
|
2015-09-10 08:51:14 +02:00
|
|
|
#[derive(PartialEq)]
|
|
|
|
pub struct ContainsUnit(()); // should be fine
|
|
|
|
|
2015-08-19 06:54:20 +02:00
|
|
|
fn main() {
|
|
|
|
// this is fine
|
|
|
|
if true == false {
|
|
|
|
}
|
|
|
|
|
|
|
|
// this warns
|
2017-02-08 14:58:07 +01:00
|
|
|
if { true; } == { false; } {
|
2015-08-19 06:54:20 +02:00
|
|
|
}
|
|
|
|
|
2017-02-08 14:58:07 +01:00
|
|
|
if { true; } > { false; } {
|
2015-08-19 06:54:20 +02:00
|
|
|
}
|
|
|
|
}
|