]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/modulo_one.rs
iterate List by value
[rust.git] / tests / ui / modulo_one.rs
index f1576447708a184f4826ec8b61418320e25161cf..cc8c8e7cdaefd5a203b3e9839fe1db98dfdc9fc8 100644 (file)
@@ -1,19 +1,14 @@
-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-
-
 #![warn(clippy::modulo_one)]
 #![allow(clippy::no_effect, clippy::unnecessary_operation)]
 
+static STATIC_ONE: usize = 2 - 1;
+
 fn main() {
     10 % 1;
     10 % 2;
+
+    const ONE: u32 = 1 * 1;
+
+    2 % ONE;
+    5 % STATIC_ONE;
 }