Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/compiler-builtins/compiler-builtins/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#![cfg_attr(f128_enabled, feature(f128))]
#![cfg_attr(all(target_family = "wasm"), feature(wasm_numeric_instr))]
//
#![allow(unstable_name_collisions)] // FIXME(float_bits_const): remove when stable
#![allow(unstable_name_collisions)] // FIXME(float_masks): remove when stable
#![allow(unused_features)]
#![allow(internal_features)]
// `mem::swap` cannot be used because it may generate references to memcpy in unoptimized code.
Expand Down
2 changes: 1 addition & 1 deletion library/compiler-builtins/libm-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f16_enabled, feature(f16))]
#![cfg_attr(f128_enabled, feature(f128))]
#![allow(clippy::unusual_byte_groupings)] // sometimes we group by sign_exp_sig
#![allow(unstable_name_collisions)] // FIXME(float_bits_const): remove when stable
#![allow(unstable_name_collisions)] // FIXME(float_masks): remove when stable

pub mod builtins_wrapper;
pub mod domain;
Expand Down
2 changes: 1 addition & 1 deletion library/compiler-builtins/libm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#![deny(rust_2024_compatibility)]
#![allow(edition_2024_expr_fragment_specifier)]
//
// FIXME(float_bits_const): remove when stable
// FIXME(float_masks): remove when stable
#![allow(unstable_name_collisions)]
// Allow idioms that come from ported C or may be more clear
#![allow(clippy::assign_op_pattern)]
Expand Down
1 change: 1 addition & 0 deletions library/core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ impl f128 {
MANTISSA_MASK = 0x0000_ffff_ffff_ffff_ffff_ffff_ffff_ffff,
exponent_bias = 16383,
assoc_int_consts = #[unstable(feature = "f128", issue = "116909")],
float_bits_const = #[unstable(feature = "f128", issue = "116909")],
feature = f128,
has_reliable_cfg = target_has_reliable_f128,
has_reliable_math_cfg = target_has_reliable_f128_math,
Expand Down
1 change: 1 addition & 0 deletions library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ impl f16 {
MANTISSA_MASK = 0x03ff,
exponent_bias = 15,
assoc_int_consts = #[unstable(feature = "f16", issue = "116909")],
float_bits_const = #[unstable(feature = "f16", issue = "116909")],
feature = f16,
has_reliable_cfg = target_has_reliable_f16,
has_reliable_math_cfg = target_has_reliable_f16_math,
Expand Down
1 change: 1 addition & 0 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ impl f32 {
MANTISSA_MASK = 0x007f_ffff,
exponent_bias = 127,
assoc_int_consts = #[stable(feature = "assoc_int_consts", since = "1.43.0")],
float_bits_const = #[stable(feature = "float_bits_const", since = "CURRENT_RUSTC_VERSION")],
}

/// Returns `true` if this value is NaN.
Expand Down
1 change: 1 addition & 0 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ impl f64 {
MANTISSA_MASK = 0x000f_ffff_ffff_ffff,
exponent_bias = 1023,
assoc_int_consts = #[stable(feature = "assoc_int_consts", since = "1.43.0")],
float_bits_const = #[stable(feature = "float_bits_const", since = "CURRENT_RUSTC_VERSION")],
}

/// Returns `true` if this value is NaN.
Expand Down
3 changes: 2 additions & 1 deletion library/core/src/num/float_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub(crate) macro float_impl(
exponent_bias = $exponent_bias:literal,
// Feature gates
assoc_int_consts = #[$assoc_int_consts:meta],
float_bits_const = #[$float_bits_const:meta],
// Things needed for `f16`/`f128` doctests
$(feature = $feature:ident,)?
$(has_reliable_cfg = $has_reliable_cfg:ident,)?
Expand All @@ -34,7 +35,7 @@ pub(crate) macro float_impl(
pub const RADIX: u32 = 2;

/// The size of this float type in bits.
#[unstable(feature = "float_bits_const", issue = "151073")]
#[$float_bits_const]
pub const BITS: u32 = $BITS;

/// Number of significant digits in base 2.
Expand Down
Loading