rust/library/core/src/num
bors 90442458ac Auto merge of #86048 - nbdd0121:no_floating_point, r=Amanieu
core: 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
2021-07-04 14:18:57 +00:00
..
dec2flt Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
flt2dec Auto merge of #86048 - nbdd0121:no_floating_point, r=Amanieu 2021-07-04 14:18:57 +00:00
shells Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
bignum.rs [clippy] remove redundant field names 2021-05-02 20:24:17 -04:00
diy_float.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
error.rs postpone stabilizaton by one release 2021-06-22 10:20:56 +01:00
f32.rs Intra doc link-ify a reference to a function 2021-06-01 05:04:48 +02:00
f64.rs Intra doc link-ify a reference to a function 2021-06-01 05:04:48 +02:00
fmt.rs Move flt2dec::{Formatted, Part} to dedicated module 2021-06-06 02:54:51 +01:00
int_macros.rs Fix comment about rustc_inherit_overflow_checks in abs(). 2021-06-17 10:02:08 +00:00
mod.rs Auto merge of #86048 - nbdd0121:no_floating_point, r=Amanieu 2021-07-04 14:18:57 +00:00
nonzero.rs Stop relying on #[feature(try_trait)] in doctests. 2021-06-12 10:58:37 +02:00
uint_macros.rs Add inherent unchecked_shl, unchecked_shr to integers 2021-05-28 22:54:39 -04:00
wrapping.rs add BITS associated constant to core::num::Wrapping 2021-05-11 13:36:43 +02:00