rust/library/core/src
Stuart Cook 37ece9cf9b
Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
..
alloc Rollup merge of #148764 - GrigorenkoPV:aligment_api, r=scottmcm 2026-01-25 07:42:57 +01:00
array Fix 'the the' typo in library/core/src/array/iter.rs 2026-01-25 03:37:57 +05:30
ascii assert_unsafe_precondition: fix some incorrect check_language_ub 2025-09-22 09:28:38 +02:00
async_iter clippy fix: markdown indentation for indented items after line break 2025-07-08 11:48:15 +00:00
bstr ByteStr::as_[mut_]byte_str 2025-11-11 23:46:10 +03:00
cell Replace version placeholders with 1.94 2026-01-20 21:17:10 -05:00
char Replace version placeholders with 1.94 2026-01-20 21:17:10 -05:00
clone fix 2025-11-27 17:55:34 +07:00
cmp Replace #[const_trait] with const in libcore 2025-11-08 06:40:27 +01:00
convert TryFrom<integer> for bool 2026-01-25 17:30:39 +00:00
ffi c-variadic: make VaList::drop call the rust va_end 2026-01-20 18:38:50 +01:00
fmt Rollup merge of #150300 - EFanZh:patch-1, r=dtolnay,tgross35 2026-01-31 21:42:46 +01:00
future Address documentation issues identified with Future 2025-06-07 20:13:54 +01:00
hash remove #[deprecated] from unstable & internal SipHasher13&24 2026-01-19 21:24:36 +00:00
intrinsics Rollup merge of #151346 - folkertdev:simd-splat, r=workingjubilee 2026-01-24 21:04:15 +01:00
io Revert #148937 (Remove initialized-bytes tracking from BorrowedBuf and BorrowedCursor) 2025-12-17 14:34:56 +00:00
iter constify Iterator 2026-01-30 15:52:40 +00:00
macros Move assert_matches to planned stable path 2026-01-21 23:17:24 +01:00
marker prevent TrivialClone implementations from appearing in rustdoc output 2025-11-09 22:26:15 +01:00
mem Fix typo for Maybe dangling docs 2026-01-29 20:26:06 +02:00
net Update CURRENT_RUSTC_VERSION post-bump 2025-09-26 18:41:32 -04:00
num Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35 2026-02-03 21:58:39 +11:00
ops Use Bound::copied instead of Bound::cloned 2026-01-30 12:46:25 -08:00
os os allow missing_docs 2026-01-26 17:08:00 +00:00
panic doc(core::panic::Location::caller): clarify semantics with visual example without changing doctests 2025-11-11 04:33:12 +01:00
pin Constify conversion traits 2025-09-01 21:38:26 -04:00
prelude Explicitly export core and std macros 2026-01-13 08:47:48 +01:00
ptr stabilize ptr_as_ref_unchecked 2026-02-02 19:47:32 +01:00
range library: Rename IterRange* to Range*Iter 2025-12-02 16:20:50 -05:00
slice Rollup merge of #151756 - Voultapher:fix-box-retag-in-sort, r=Mark-Simulacrum 2026-02-02 10:28:29 +11:00
str Match <OsString as Debug>::fmt to that of str 2025-11-17 16:05:00 -05:00
sync Add feature to doc example 2026-01-06 23:38:31 +01:00
task Finish transition from semitransparent to semiopaque for rustc_macro_transparency 2026-01-08 19:14:45 +01:00
unicode Avoid index check in char::to_lowercase and char::to_uppercase 2025-12-30 16:20:19 -03:00
any.rs Introduce vtable_for intrinsic and use it to implement try_as_dyn and try_as_dyn_mut for fallible coercion from &T / &mut T to &dyn Trait. 2025-12-16 06:39:58 -04:00
arch.rs update version placeholders 2025-05-12 15:33:30 +02:00
ascii.rs add doc(alias("AsciiChar")) to core::ascii::Char 2025-06-20 11:11:51 -05:00
asserting.rs chore: Update typos to 1.38.1 2025-10-20 12:20:15 -06:00
bool.rs constify boolean methods 2026-01-23 15:12:47 +07:00
borrow.rs Make const BorrowMut require const Borrow 2025-10-21 17:55:00 +07:00
cell.rs Rollup merge of #146863 - matwatson:core-cell-improve-doc, r=tgross35 2026-01-05 00:16:33 -05:00
clone.rs rename the derive_{eq, clone_copy} features to *_internals 2026-01-08 12:35:30 +00:00
cmp.rs Rollup merge of #150871 - simplify-partialord-doc, r=jhpratt 2026-01-11 14:27:57 +11:00
contracts.rs Apply suggestions from code review 2025-04-10 16:32:56 -07:00
default.rs Fix typo in default.rs 2025-09-07 21:16:35 -07:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Update provider API docs 2025-12-18 19:07:49 -08:00
escape.rs Get rid of EscapeDebugInner. 2025-06-15 22:08:41 +02:00
hint.rs Rollup merge of #151612 - tgross35:cold-path-doc, r=scottmcm 2026-01-26 19:52:41 +11:00
index.rs add SliceIndex wrapper types Last and Clamp<Idx> 2025-09-15 15:25:12 -04:00
internal_macros.rs Constify remaining operators 2025-08-10 01:11:45 -04:00
lib.miri.rs
lib.rs Move bigint helper tracking issues 2026-02-02 18:45:26 -05:00
marker.rs Replace #[rustc_do_not_implement_via_object] with #[rustc_dyn_incompatible_trait], which makes the marked trait dyn-incompatible. 2026-01-20 12:54:40 -06:00
option.rs Rollup merge of #143650 - lolbinarycat:core-option_get_or_try_insert_with-143648, r=jhpratt 2026-01-30 22:52:19 -05:00
panic.rs Finish transition from semitransparent to semiopaque for rustc_macro_transparency 2026-01-08 19:14:45 +01:00
panicking.rs Add comment. 2025-11-12 14:33:41 +01:00
pat.rs Allow unsizing pattern types with pointer base 2025-10-21 11:22:51 +00:00
pin.rs Rollup merge of #150705 - justanotheranonymoususer:patch-1, r=joboet 2026-01-26 14:36:21 +11:00
primitive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
primitive_docs.rs Remove uses of cfg(any()/all()) 2025-12-10 23:41:19 +00:00
profiling.rs Add -Zannotate-moves for profiler visibility of move/copy operations 2025-11-06 15:39:45 -08:00
random.rs random: Provide a Distribution<T> trait 2025-07-11 10:21:34 -07:00
range.rs library: Rename IterRange* to Range*Iter 2025-12-02 16:20:50 -05:00
result.rs Update documentation for Result::ok() 2026-02-01 18:01:24 -08:00
time.rs Rollup merge of #149582 - max-heller:duration-integer-division, r=Mark-Simulacrum 2025-12-28 22:52:30 +01:00
tuple.rs add CloneFromCell and Cell::get_cloned 2025-10-01 18:47:09 -04:00
ub_checks.rs Replace Rvalue::NullaryOp by a variant in mir::ConstValue. 2025-12-14 17:25:51 +00:00
unit.rs core: Make Debug impl of raw pointers print metadata if present 2025-02-15 17:27:55 +01:00
unsafe_binder.rs Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 2024-12-12 16:29:40 +00:00
wtf8.rs Match <OsString as Debug>::fmt to that of str 2025-11-17 16:05:00 -05:00