Skip to content

Commit

Permalink
use u128::MAX symbolic name
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Apr 18, 2020
1 parent a82efce commit bb38ab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/compile-fail/intrinsics/float_to_int_64_too_big4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ extern "rust-intrinsic" {
}

fn main() {
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`
}

0 comments on commit bb38ab4

Please sign in to comment.