We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99f7fb0 commit eb59b9cCopy full SHA for eb59b9c
tests/ui/numbers-arithmetic/issue-109567.rs
@@ -1,16 +1,14 @@
1
// run-pass
2
// check-run-results
3
4
-pub fn f() -> f64 {
+fn f() -> f64 {
5
std::hint::black_box(-1.0) % std::hint::black_box(-1.0)
6
}
7
8
-pub fn g() -> f64 {
9
- -1.0 % -1.0
10
-}
+const G: f64 = -1.0 % -1.0;
11
12
pub fn main() {
13
- assert_eq!(-1, g().signum() as i32);
14
- assert_eq!((-0.0_f64).to_bits(), f().to_bits());
15
- assert_eq!(f().signum(), g().signum());
+ assert_eq!(-1, G.signum() as i32);
+ assert_eq!((-0.0_f64).to_bits(), G.to_bits());
+ assert_eq!(f().signum(), G.signum());
16
0 commit comments