mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
5d818914af
There are a handful of tier 2 and tier 3 targets that cause a LLVM crash or linker error when generating code that contains `f16` or `f128`. The cranelift backend also does not support these types. To work around this, every function in `std` or `core` that contains these types must be marked `#[inline]` in order to avoid sending any code to the backend unless specifically requested. However, this is inconvenient and easy to forget. Introduce a check for these types in the frontend that automatically inlines any function signatures that take or return `f16` or `f128`. Note that this is not a perfect fix because it does not account for the types being passed by reference or as members of aggregate types, but this is sufficient for what is currently needed in the standard library. Fixes: https://github.com/rust-lang/rust/issues/133035 Closes: https://github.com/rust-lang/rust/pull/133037 |
||
---|---|---|
.. | ||
f16-f128-inline.rs | ||
f16.rs | ||
f128.rs |