We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a82efce commit bb38ab4Copy full SHA for bb38ab4
tests/compile-fail/intrinsics/float_to_int_64_too_big4.rs
@@ -6,5 +6,5 @@ extern "rust-intrinsic" {
6
}
7
8
fn main() {
9
- unsafe { float_to_int_unchecked::<f64, u128>(340282366920938463463374607431768211455.0f64); } //~ ERROR: cannot be represented in target type `u128`
+ unsafe { float_to_int_unchecked::<f64, u128>(u128::MAX as f64); } //~ ERROR: cannot be represented in target type `u128`
10
0 commit comments