mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
15 lines
378 B
Rust
15 lines
378 B
Rust
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
|
|
#![allow(unused)]
|
|
|
|
#[deny(absurd_unsigned_comparisons)]
|
|
fn main() {
|
|
1u32 <= 0; //~ERROR testing whether an unsigned integer is non-positive
|
|
1u8 <= 0; //~ERROR testing whether an unsigned integer is non-positive
|
|
1i32 <= 0;
|
|
0 >= 1u32; //~ERROR testing whether an unsigned integer is non-positive
|
|
0 >= 1;
|
|
1u32 > 0;
|
|
}
|