]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #87522 - frogtd:patch-1, r=yaahc
authorYuki Okushi <jtitor@2k36.org>
Fri, 30 Jul 2021 07:26:53 +0000 (16:26 +0900)
committerGitHub <noreply@github.com>
Fri, 30 Jul 2021 07:26:53 +0000 (16:26 +0900)
Fix assert in diy_float

The shifting should have gone the other way, the current incarnation is always true.

library/core/src/num/diy_float.rs

index 0a609417dcf4cbedf8fe12d92dd9078d9f852946..ce7f6475d059914370b50d7768f3311cca539df7 100644 (file)
@@ -65,7 +65,7 @@ pub fn normalize(&self) -> Fp {
             f <<= 1;
             e -= 1;
         }
-        debug_assert!(f >= (1 >> 63));
+        debug_assert!(f >= (1 << 63));
         Fp { f, e }
     }