|
|
|
|
|
by kd5bjo
2165 days ago
|
|
> Panicing is not in line with how `as` casts are supposed to act. (e.g. `u32value as u8` does not panic but just takes the "lower" one byte.) So, instead of this being traditional UB, it was a combination of two separate issues: - Rustc erroneously emitting code that exercised an LLVM UB case, and - Imprecise Rust documentation around the exact behavior of float -> int ‘as’ casts |
|