2018-07-28 17:34:52 +02:00
|
|
|
#![warn(clippy::modulo_one)]
|
|
|
|
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
|
2015-05-31 14:17:31 +02:00
|
|
|
|
2019-09-09 17:01:01 +02:00
|
|
|
static STATIC_ONE: usize = 2 - 1;
|
|
|
|
|
2015-05-31 14:17:31 +02:00
|
|
|
fn main() {
|
2017-02-08 14:58:07 +01:00
|
|
|
10 % 1;
|
2015-05-31 14:17:31 +02:00
|
|
|
10 % 2;
|
2019-09-09 17:01:01 +02:00
|
|
|
|
|
|
|
const ONE: u32 = 1 * 1;
|
|
|
|
|
|
|
|
2 % ONE;
|
|
|
|
5 % STATIC_ONE;
|
2015-05-31 14:17:31 +02:00
|
|
|
}
|