core: add unstable no_fp_fmt_parse to disable float formatting code by nbdd0121 · Pull Request #86048 · rust-lang/rust
and removed T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.labels
Jun 23, 2021
bors
added
S-waiting-on-author
and removed S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.labels
Jul 2, 2021In some projects (e.g. kernel), floating point is forbidden. They can disable hardware floating point support and use `+soft-float` to avoid fp instructions from being generated, but as libcore contains the formatting code for `f32` and `f64`, some fp intrinsics are depended. One could define stubs for these intrinsics that just panic [1], but it means that if any formatting functions are accidentally used, mistake can only be caught during the runtime rather than during compile-time or link-time, and they consume a lot of space without LTO. This patch provides an unstable cfg `no_fp_fmt_parse` to disable these. A panicking stub is still provided for the `Debug` implementation (unfortunately) because there are some SIMD types that use `#[derive(Debug)]`. [1]: https://lkml.org/lkml/2021/4/14/1028
nbdd0121
changed the title
core: add unstable no_floating_point to disable float formatting code
core: add unstable no_fp_fmt_parse to disable float formatting code
ojeda
mentioned this pull request
55 tasks
bors
added
S-waiting-on-bors
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
Jul 4, 2021
Urgau
mentioned this pull request
This was referenced
Oct 11, 2021Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request
Sep 21, 2022`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See rust-lang#86048 and rust-lang#84266 for similar requests. Of course, the particular names are not important.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request
Sep 21, 2022`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See rust-lang#86048 and rust-lang#84266 for similar requests. Of course, the particular names are not important.
GKFX
mentioned this pull request
thomcc pushed a commit to pgcentralfoundation/postgrestd that referenced this pull request
Feb 10, 2023`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See rust-lang/rust#86048 and rust-lang/rust#84266 for similar requests. Of course, the particular names are not important.
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request
Mar 11, 2025core: add unstable no_fp_fmt_parse to disable float formatting code In some projects (e.g. kernel), floating point is forbidden. They can disable hardware floating point support and use `+soft-float` to avoid fp instructions from being generated, but as libcore contains the formatting code for `f32` and `f64`, some fp intrinsics are depended. One could define stubs for these intrinsics that just panic [1], but it means that if any formatting functions are accidentally used, mistake can only be caught during the runtime rather than during compile-time or link-time, and they consume a lot of space without LTO. This patch provides an unstable cfg `no_fp_fmt_parse` to disable these. A panicking stub is still provided for the `Debug` implementation (unfortunately) because there are some SIMD types that use `#[derive(Debug)]`. [1]: https://lkml.org/lkml/2021/4/14/1028
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters