]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/arithmetic_side_effects.rs
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / tools / clippy / tests / ui / arithmetic_side_effects.rs
index b25e68f13061b9f6f13eb6646818c41519f85f9b..b5ed8988a518ff9299bc679ce8a5c0d9efb4f104 100644 (file)
@@ -150,8 +150,12 @@ pub fn non_overflowing_ops_or_ops_already_handled_by_the_compiler_should_not_tri
     _n = 23 + 85;
 
     // Unary
-    _n = -1;
-    _n = -(-1);
+    _n = -2147483647;
+    _n = -i32::MAX;
+    _n = -i32::MIN;
+    _n = -&2147483647;
+    _n = -&i32::MAX;
+    _n = -&i32::MIN;
 }
 
 pub fn runtime_ops() {