about summary refs log tree commit diff
path: root/src/test/codegen/unchecked-float-casts.rs
AgeCommit message (Collapse)AuthorLines
2017-11-07Saturating casts between integers and floats (both directions).Robin Kruppe-0/+65
This affects regular code generation as well as constant evaluation in trans, but not the HIR constant evaluator because that one returns an error for overflowing casts and NaN-to-int casts. That error is conservatively correct and we should be careful to not accept more code in constant expressions. The changes to code generation are guarded by a new -Z flag, to be able to evaluate the performance impact. The trans constant evaluation changes are unconditional because they have no run time impact and don't affect type checking either.