about summary refs log tree commit diff
path: root/tests/ui/modulo_arithmetic_float.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-02-27 21:40:02 +0100
committerPhilipp Krones <hello@philkrones.com>2025-02-27 21:51:42 +0100
commit02e812af4d936a0984802bb76bb3e423e2fb94a5 (patch)
tree196fe8bde7074c1a5fa2b0af4a74892c51c8188c /tests/ui/modulo_arithmetic_float.rs
parent17bda0c0febb8c51fb14a6856d365eab86fc6162 (diff)
parent15180d4eb9dcff9441a8c3ff3382804123c5b0a1 (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'tests/ui/modulo_arithmetic_float.rs')
-rw-r--r--tests/ui/modulo_arithmetic_float.rs59
1 files changed, 27 insertions, 32 deletions
diff --git a/tests/ui/modulo_arithmetic_float.rs b/tests/ui/modulo_arithmetic_float.rs
index a5b63bed531..0e08174f686 100644
--- a/tests/ui/modulo_arithmetic_float.rs
+++ b/tests/ui/modulo_arithmetic_float.rs
@@ -6,67 +6,62 @@
 fn main() {
     // Lint when both sides are const and of the opposite sign
     -1.6 % 2.1;
-    //~^ ERROR: you are using modulo operator on constants with different signs: `-1.600 %
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     1.6 % -2.1;
-    //~^ ERROR: you are using modulo operator on constants with different signs: `1.600 %
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     (1.1 - 2.3) % (1.1 + 2.3);
-    //~^ ERROR: you are using modulo operator on constants with different signs: `-1.200 %
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     (1.1 + 2.3) % (1.1 - 2.3);
-    //~^ ERROR: you are using modulo operator on constants with different signs: `3.400 %
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
 
     // Lint on floating point numbers
     let a_f16: f16 = -1.6;
     let mut b_f16: f16 = 2.1;
     a_f16 % b_f16;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f16 % a_f16;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f16 %= a_f16;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
 
     // Lint on floating point numbers
     let a_f32: f32 = -1.6;
     let mut b_f32: f32 = 2.1;
     a_f32 % b_f32;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f32 % a_f32;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f32 %= a_f32;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
 
     let a_f64: f64 = -1.6;
     let mut b_f64: f64 = 2.1;
     a_f64 % b_f64;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f64 % a_f64;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f64 %= a_f64;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
 
     let a_f128: f128 = -1.6;
     let mut b_f128: f128 = 2.1;
     a_f128 % b_f128;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f128 % a_f128;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
+
     b_f128 %= a_f128;
-    //~^ ERROR: you are using modulo operator on types that might have different signs
-    //~| NOTE: double check for expected result especially when interoperating with differ
+    //~^ modulo_arithmetic
 
     // No lint when both sides are const and of the same sign
     1.6 % 2.1;