Rollup merge of #71269 - Mark-Simulacrum:sat-float-casts, r=nikic
Define UB in float-to-int casts to saturate This closes #10184 by defining the behavior there to saturate infinities and values exceeding the integral range (on the lower or upper end). `NaN` is sent to zero.
This commit is contained in:
commit
14d608f1d8
6 changed files with 420 additions and 52 deletions
|
|
@ -559,7 +559,7 @@ fn test_debugging_options_tracking_hash() {
|
|||
tracked!(sanitizer, Some(Sanitizer::Address));
|
||||
tracked!(sanitizer_memory_track_origins, 2);
|
||||
tracked!(sanitizer_recover, vec![Sanitizer::Address]);
|
||||
tracked!(saturating_float_casts, true);
|
||||
tracked!(saturating_float_casts, Some(true));
|
||||
tracked!(share_generics, Some(true));
|
||||
tracked!(show_span, Some(String::from("abc")));
|
||||
tracked!(src_hash_algorithm, Some(SourceFileHashAlgorithm::Sha1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue