@@ -366,9 +366,11 @@ same trait object.
366366 * zero-extend if the source is unsigned
367367 * sign-extend if the source is signed
368368 * Casting from a float to an integer will round the float towards zero
369- * ** [ NOTE: currently this will cause Undefined Behavior if the rounded
370- value cannot be represented by the target integer type] [ float-int ] ** .
371- This includes Inf and NaN. This is a bug and will be fixed.
369+ * ` NaN ` will return ` 0 `
370+ * Values larger than the maximum integer value will saturate to the
371+ maximum value of the integer type.
372+ * Values smaller than the minimum integer value will saturate to the
373+ minimum value of the integer type.
372374 * Casting from an integer to float will produce the closest possible float \*
373375 * if necessary, rounding is according to ` roundTiesToEven ` mode \*\*\*
374376 * on overflow, infinity (of the same sign as the input) is produced
@@ -398,8 +400,6 @@ expected.
398400number, preferring the one with an even least significant digit if exactly
399401halfway between two floating point numbers.
400402
401- [ float-int ] : https://github.com/rust-lang/rust/issues/10184
402-
403403## Assignment expressions
404404
405405> ** <sup >Syntax</sup >** \
@@ -456,7 +456,6 @@ assert_eq!(x, 14);
456456[ place expression ] : ../expressions.md#place-expressions-and-value-expressions
457457[ value expression ] : ../expressions.md#place-expressions-and-value-expressions
458458[ temporary value ] : ../expressions.md#temporaries
459- [ float-int ] : https://github.com/rust-lang/rust/issues/10184
460459[ float-float ] : https://github.com/rust-lang/rust/issues/15536
461460[ `unit` type ] : ../types/tuple.md
462461
0 commit comments