Skip to content

[beta] Backport unstabilization of extended varargs abi support #136934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c09561c
update version placeholders
pietroalbini Jan 6, 2025
3bc7fca
update channel to beta
pietroalbini Jan 6, 2025
031ad72
Pass objcopy args for stripping on OSX
Noratrieb Jan 2, 2025
3d6fdff
rustfmt: drop nightly-gating of the `--style-edition` flag registration
jieyouxu Jan 7, 2025
fc252e9
Revert "fix missing rustfmt for apple darwin"
pietroalbini Jan 8, 2025
b2ab974
Revert "fix missing rustfmt and clippy for msi"
pietroalbini Jan 8, 2025
e30eeff
Auto merge of #135163 - pietroalbini:pa-beta, r=pietroalbini
bors Jan 8, 2025
9e57baf
bump stage0 to 1.84.0
cuviper Jan 10, 2025
4475508
run borrowck tests on BIDs and emit tail-expr-drop-order lints for
dingxiangfei2009 Dec 4, 2024
e398428
apply suggestions on fn name
dingxiangfei2009 Dec 19, 2024
61c0bcf
remove an extraneous comment
dingxiangfei2009 Dec 19, 2024
273873a
Don't create cycles by normalizing opaques defined in the body we're …
compiler-errors Jan 5, 2025
1b8413e
Don't do AccessDepth::Drop for types with no drop impl
compiler-errors Jan 5, 2025
18d3153
Try to explain borrow for tail expr temporary drop order change in 2024
compiler-errors Jan 6, 2025
ce4e43f
Bless test UI changes in backport
cuviper Jan 11, 2025
fe9b975
Auto merge of #135351 - cuviper:beta-next, r=cuviper
bors Jan 11, 2025
402eeff
[beta] TRPL: incorporate all backward-compatible Edition changes
chriskrycho Jan 14, 2025
f836dc2
Mark rustbook as an external tool
ehuss Jan 13, 2025
5904ea4
Backport rust-lang/rust-analyzer#18760: internal: Workaround salsa cy…
Veykril Jan 16, 2025
8a7dc21
do not in-place-iterate over flatmap/flatten
the8472 Jan 4, 2025
ae37d1c
add regression test for unsound Flatten/FlatMap specialization
the8472 Jan 4, 2025
e126c8d
Make sure to mark IMPL_TRAIT_REDUNDANT_CAPTURES as Allow in edition 2024
compiler-errors Jan 13, 2025
1c85981
Update to LLVM 19.1.7
nikic Jan 14, 2025
d0d224d
Auto merge of #135508 - chriskrycho:trpl-edition-updates, r=ehuss
bors Jan 17, 2025
752fecf
Auto merge of #135609 - cuviper:beta-next, r=cuviper
bors Jan 17, 2025
4416507
Auto merge of #135575 - Veykril:push-ynurtulswkpo, r=Mark-Simulacrum
bors Jan 20, 2025
a41d236
Always force non-trimming of path in `unreachable_patterns` lint
estebank Jan 9, 2025
eb03c32
Add logic to override profile for non git sources
tanvincible Jan 13, 2025
f379706
resolve symlinks of LLVM tool binaries before copying them
onur-ozkan Jan 16, 2025
953a1a0
avoid running the overlap check twice
lcnr Jan 15, 2025
e35db42
add cache to `AmbiguityCausesVisitor`
lcnr Jan 17, 2025
f6aed49
add test
lcnr Jan 17, 2025
4595e11
When LLVM's location discriminator value limit is exceeded, emit loca…
khuey Jan 17, 2025
e92addf
make it possible to use ci-rustc on tarball sources
onur-ozkan Jan 19, 2025
5f5e70b
Remove test panic from File::open
ChrisDenton Jan 21, 2025
f05d305
Only assert the `Parser` size on specific arches
cuviper Jan 22, 2025
ee2ff9d
[beta] TRPL: more backward-compatible Edition changes
chriskrycho Jan 21, 2025
130f951
[beta] TRPL: integrate edits to Chapter 17
chriskrycho Jan 21, 2025
14445aa
Auto merge of #136017 - cuviper:beta-next, r=cuviper
bors Jan 26, 2025
ee94112
Rollup merge of #135852 - lukas-code:asyncfn-prelude-core, r=compiler…
matthiaskrgr Jan 30, 2025
2fa9d47
Disable some incorrect rust-analyzer diagnostics on beta
Veykril Jan 29, 2025
fdc22dc
Rollup merge of #136312 - compiler-errors:overflow_delimited_expr-202…
jhpratt Jan 31, 2025
b5a02ff
Update edition-guide
ehuss Feb 1, 2025
cfe3de2
Fix core AsyncFn stability attribute
ehuss Feb 1, 2025
0277061
Auto merge of #136391 - ehuss:rust-1.85-beta-backports, r=ehuss
bors Feb 1, 2025
887965d
Ensure that we don't try to access fields on a non-struct pattern typ…
estebank Jan 7, 2025
e98d524
Add check for missing fields in enum variant pattern
estebank Jan 8, 2025
f264675
modify test to side-step platform-dependent stderr output
estebank Jan 8, 2025
13c3f9b
Do not include GCC source code in source tarballs
Kobzol Jan 17, 2025
7302b30
Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthe…
lqd Jan 18, 2025
c6063d4
Revert "Rollup merge of #134371 - scottmcm:fix-134352, r=oli-obk"
lqd Jan 18, 2025
197b416
Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadat…
lqd Jan 18, 2025
9405480
add tests for issue 135671
lqd Jan 18, 2025
741fa9e
ensure sufficient stack in tail call check
lqd Jan 31, 2025
01283c4
ensure sufficient stack in unsafety check
lqd Jan 31, 2025
bf24cad
Enable kernel sanitizers for aarch64-unknown-none-softfloat
workingjubilee Jan 22, 2025
3821385
Auto merge of #136650 - cuviper:beta-next, r=cuviper
bors Feb 6, 2025
74c0e61
Revert "Stabilize `extended_varargs_abi_support`"
workingjubilee Feb 12, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update version placeholders
  • Loading branch information
pietroalbini committed Jan 7, 2025
commit c09561c7f006d068a9a3d87c0bce917ae7f6f6b2
6 changes: 3 additions & 3 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare_features! (
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
(accepted, async_await, "1.39.0", Some(50547)),
/// Allows `async || body` closures.
(accepted, async_closure, "CURRENT_RUSTC_VERSION", Some(62290)),
(accepted, async_closure, "1.85.0", Some(62290)),
/// Allows async functions to be declared, implemented, and used in traits.
(accepted, async_fn_in_trait, "1.75.0", Some(91611)),
/// Allows all literals in attribute lists and values of key-value pairs.
Expand Down Expand Up @@ -176,7 +176,7 @@ declare_features! (
/// Allows using the `#[diagnostic]` attribute tool namespace
(accepted, diagnostic_namespace, "1.78.0", Some(111996)),
/// Controls errors in trait implementations.
(accepted, do_not_recommend, "CURRENT_RUSTC_VERSION", Some(51992)),
(accepted, do_not_recommend, "1.85.0", Some(51992)),
/// Allows `#[doc(alias = "...")]`.
(accepted, doc_alias, "1.48.0", Some(50146)),
/// Allows `..` in tuple (struct) patterns.
Expand All @@ -199,7 +199,7 @@ declare_features! (
(accepted, extended_key_value_attributes, "1.54.0", Some(78835)),
/// Allows using `efiapi`, `aapcs`, `sysv64` and `win64` as calling
/// convention for functions with varargs.
(accepted, extended_varargs_abi_support, "CURRENT_RUSTC_VERSION", Some(100189)),
(accepted, extended_varargs_abi_support, "1.85.0", Some(100189)),
/// Allows resolving absolute paths as paths from other crates.
(accepted, extern_absolute_paths, "1.30.0", Some(44660)),
/// Allows `extern crate foo as bar;`. This puts `bar` into extern prelude.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ declare_features! (
/// Allows defining generators.
(removed, generators, "1.21.0", Some(43122), Some("renamed to `coroutines`")),
/// An extension to the `generic_associated_types` feature, allowing incomplete features.
(removed, generic_associated_types_extended, "CURRENT_RUSTC_VERSION", Some(95451),
(removed, generic_associated_types_extended, "1.85.0", Some(95451),
Some(
"feature needs overhaul and reimplementation pending \
better implied higher-ranked implied bounds support"
Expand Down
22 changes: 11 additions & 11 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ declare_features! (
(unstable, hexagon_target_feature, "1.27.0", Some(44839)),
(unstable, lahfsahf_target_feature, "1.78.0", Some(44839)),
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
(unstable, m68k_target_feature, "CURRENT_RUSTC_VERSION", Some(134328)),
(unstable, m68k_target_feature, "1.85.0", Some(134328)),
(unstable, mips_target_feature, "1.27.0", Some(44839)),
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
Expand All @@ -342,7 +342,7 @@ declare_features! (
(unstable, sse4a_target_feature, "1.27.0", Some(44839)),
(unstable, tbm_target_feature, "1.27.0", Some(44839)),
(unstable, wasm_target_feature, "1.30.0", Some(44839)),
(unstable, x87_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
(unstable, x87_target_feature, "1.85.0", Some(44839)),
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
// Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
Expand Down Expand Up @@ -378,25 +378,25 @@ declare_features! (
/// Enables experimental inline assembly support for additional architectures.
(unstable, asm_experimental_arch, "1.58.0", Some(93335)),
/// Enables experimental register support in inline assembly.
(unstable, asm_experimental_reg, "CURRENT_RUSTC_VERSION", Some(133416)),
(unstable, asm_experimental_reg, "1.85.0", Some(133416)),
/// Allows using `label` operands in inline assembly.
(unstable, asm_goto, "1.78.0", Some(119364)),
/// Allows using `label` operands in inline assembly together with output operands.
(unstable, asm_goto_with_outputs, "CURRENT_RUSTC_VERSION", Some(119364)),
(unstable, asm_goto_with_outputs, "1.85.0", Some(119364)),
/// Allows the `may_unwind` option in inline assembly.
(unstable, asm_unwind, "1.58.0", Some(93334)),
/// Allows users to enforce equality of associated constants `TraitImpl<AssocConst=3>`.
(unstable, associated_const_equality, "1.58.0", Some(92827)),
/// Allows associated type defaults.
(unstable, associated_type_defaults, "1.2.0", Some(29661)),
/// Allows async functions to be called from `dyn Trait`.
(incomplete, async_fn_in_dyn_trait, "CURRENT_RUSTC_VERSION", Some(133119)),
(incomplete, async_fn_in_dyn_trait, "1.85.0", Some(133119)),
/// Allows `#[track_caller]` on async functions.
(unstable, async_fn_track_caller, "1.73.0", Some(110011)),
/// Allows `for await` loops.
(unstable, async_for_loop, "1.77.0", Some(118898)),
/// Allows `async` trait bound modifier.
(unstable, async_trait_bounds, "CURRENT_RUSTC_VERSION", Some(62290)),
(unstable, async_trait_bounds, "1.85.0", Some(62290)),
/// Allows using C-variadics.
(unstable, c_variadic, "1.34.0", Some(44930)),
/// Allows the use of `#[cfg(<true/false>)]`.
Expand Down Expand Up @@ -434,7 +434,7 @@ declare_features! (
/// Allows `const || {}` closures in const contexts.
(incomplete, const_closures, "1.68.0", Some(106003)),
/// Allows using `~const Destruct` bounds and calling drop impls in const contexts.
(unstable, const_destruct, "CURRENT_RUSTC_VERSION", Some(133214)),
(unstable, const_destruct, "1.85.0", Some(133214)),
/// Allows `for _ in _` loops in const contexts.
(unstable, const_for, "1.56.0", Some(87575)),
/// Be more precise when looking for live drops in a const context.
Expand All @@ -458,7 +458,7 @@ declare_features! (
(unstable, decl_macro, "1.17.0", Some(39412)),
/// Allows the use of default values on struct definitions and the construction of struct
/// literals with the functional update syntax without a base.
(unstable, default_field_values, "CURRENT_RUSTC_VERSION", Some(132162)),
(unstable, default_field_values, "1.85.0", Some(132162)),
/// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait
(unstable, deprecated_safe, "1.61.0", Some(94978)),
/// Allows having using `suggestion` in the `#[deprecated]` attribute.
Expand Down Expand Up @@ -508,7 +508,7 @@ declare_features! (
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
(unstable, global_registration, "1.80.0", Some(125119)),
/// Allows using guards in patterns.
(incomplete, guard_patterns, "CURRENT_RUSTC_VERSION", Some(129967)),
(incomplete, guard_patterns, "1.85.0", Some(129967)),
/// Allows using `..=X` as a patterns in slices.
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
/// Allows `if let` guard in match arms.
Expand Down Expand Up @@ -637,9 +637,9 @@ declare_features! (
/// not changed from prior instances of the same struct (RFC #2528)
(unstable, type_changing_struct_update, "1.58.0", Some(86555)),
/// Allows using `unsafe<'a> &'a T` unsafe binder types.
(incomplete, unsafe_binders, "CURRENT_RUSTC_VERSION", Some(130516)),
(incomplete, unsafe_binders, "1.85.0", Some(130516)),
/// Allows declaring fields `unsafe`.
(incomplete, unsafe_fields, "CURRENT_RUSTC_VERSION", Some(132922)),
(incomplete, unsafe_fields, "1.85.0", Some(132922)),
/// Allows const generic parameters to be defined with types that
/// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
(incomplete, unsized_const_params, "1.82.0", Some(95174)),
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@ impl<Args: Tuple, F: Fn<Args> + ?Sized, A: Allocator> Fn<Args> for Box<F, A> {
}

#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args> for Box<F, A> {
type Output = F::Output;
type CallOnceFuture = F::CallOnceFuture;
Expand All @@ -2020,7 +2020,7 @@ impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args>
}

#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> for Box<F, A> {
type CallRefFuture<'a>
= F::CallRefFuture<'a>
Expand All @@ -2033,7 +2033,7 @@ impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> f
}

#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator> AsyncFn<Args> for Box<F, A> {
extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_> {
F::async_call(self, args)
Expand Down
10 changes: 5 additions & 5 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl Layout {
/// allocate backing structure for `T` (which could be a trait
/// or other unsized type like a slice).
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[must_use]
#[inline]
pub const fn for_value<T: ?Sized>(t: &T) -> Self {
Expand Down Expand Up @@ -252,7 +252,7 @@ impl Layout {
/// Returns an error if the combination of `self.size()` and the given
/// `align` violates the conditions listed in [`Layout::from_size_align`].
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline]
pub const fn align_to(&self, align: usize) -> Result<Self, LayoutError> {
if let Some(align) = Alignment::new(align) {
Expand Down Expand Up @@ -327,7 +327,7 @@ impl Layout {
/// This is equivalent to adding the result of `padding_needed_for`
/// to the layout's current size.
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[must_use = "this returns a new `Layout`, \
without modifying the original"]
#[inline]
Expand Down Expand Up @@ -426,7 +426,7 @@ impl Layout {
/// # assert_eq!(repr_c(&[u64, u32, u16, u32]), Ok((s, vec![0, 8, 12, 16])));
/// ```
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline]
pub const fn extend(&self, next: Self) -> Result<(Self, usize), LayoutError> {
let new_align = Alignment::max(self.align, next.align);
Expand Down Expand Up @@ -489,7 +489,7 @@ impl Layout {
/// On arithmetic overflow or when the total size would exceed
/// `isize::MAX`, returns `LayoutError`.
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline]
pub const fn array<T>(n: usize) -> Result<Self, LayoutError> {
// Reduce the amount of code we need to monomorphize per `T`.
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,10 @@ pub struct BuildHasherDefault<H>(marker::PhantomData<fn() -> H>);

impl<H> BuildHasherDefault<H> {
/// Creates a new BuildHasherDefault for Hasher `H`.
#[stable(feature = "build_hasher_default_const_new", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "build_hasher_default_const_new", since = "1.85.0")]
#[rustc_const_stable(
feature = "build_hasher_default_const_new",
since = "CURRENT_RUSTC_VERSION"
since = "1.85.0"
)]
pub const fn new() -> Self {
BuildHasherDefault(marker::PhantomData)
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ macro_rules! spec_tuple_impl {
#[doc(fake_variadic)]
#[doc = "This trait is implemented for tuples up to twelve items long. The `impl`s for \
1- and 3- through 12-ary tuples were stabilized after 2-tuples, in \
CURRENT_RUSTC_VERSION."]
1.85.0."]
=> ($ty_name, $var_name, $extend_ty_name, $cnt),
);
};
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ impl<T> MaybeUninit<T> {
/// ```
#[inline(always)]
#[stable(feature = "maybe_uninit_write", since = "1.55.0")]
#[rustc_const_stable(feature = "const_maybe_uninit_write", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_maybe_uninit_write", since = "1.85.0")]
pub const fn write(&mut self, val: T) -> &mut T {
*self = MaybeUninit::new(val);
// SAFETY: We just initialized this value.
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pub const fn size_of<T>() -> usize {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_size_of_val", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_size_of_val", since = "1.85.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "mem_size_of_val")]
pub const fn size_of_val<T: ?Sized>(val: &T) -> usize {
// SAFETY: `val` is a reference, so it's a valid raw pointer
Expand Down Expand Up @@ -484,7 +484,7 @@ pub const fn align_of<T>() -> usize {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_align_of_val", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_align_of_val", since = "1.85.0")]
#[allow(deprecated)]
pub const fn align_of_val<T: ?Sized>(val: &T) -> usize {
// SAFETY: val is a reference, so it's a valid raw pointer
Expand Down Expand Up @@ -725,7 +725,7 @@ pub unsafe fn uninitialized<T>() -> T {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
#[rustc_diagnostic_item = "mem_swap"]
pub const fn swap<T>(x: &mut T, y: &mut T) {
// SAFETY: `&mut` guarantees these are typed readable and writable
Expand Down
22 changes: 11 additions & 11 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ impl f32 {
/// ```
#[must_use = "this returns the result of the operation, without modifying the original"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn recip(self) -> f32 {
1.0 / self
Expand All @@ -836,7 +836,7 @@ impl f32 {
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn to_degrees(self) -> f32 {
// Use a constant for better precision.
Expand All @@ -856,7 +856,7 @@ impl f32 {
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn to_radians(self) -> f32 {
const RADS_PER_DEG: f32 = consts::PI / 180.0;
Expand All @@ -878,7 +878,7 @@ impl f32 {
/// ```
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn max(self, other: f32) -> f32 {
intrinsics::maxnumf32(self, other)
Expand All @@ -899,7 +899,7 @@ impl f32 {
/// ```
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn min(self, other: f32) -> f32 {
intrinsics::minnumf32(self, other)
Expand Down Expand Up @@ -988,8 +988,8 @@ impl f32 {
/// assert_eq!((-5.5f32).midpoint(8.0), 1.25);
/// ```
#[inline]
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
pub const fn midpoint(self, other: f32) -> f32 {
cfg_if! {
// Allow faster implementation that have known good 64-bit float
Expand Down Expand Up @@ -1396,7 +1396,7 @@ impl f32 {
/// ```
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "clamp", since = "1.50.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn clamp(mut self, min: f32, max: f32) -> f32 {
const_assert!(
Expand Down Expand Up @@ -1433,7 +1433,7 @@ impl f32 {
/// ```
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn abs(self) -> f32 {
// SAFETY: this is actually a safe intrinsic
Expand All @@ -1458,7 +1458,7 @@ impl f32 {
/// ```
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline]
pub const fn signum(self) -> f32 {
if self.is_nan() { Self::NAN } else { 1.0_f32.copysign(self) }
Expand Down Expand Up @@ -1493,7 +1493,7 @@ impl f32 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[inline]
#[stable(feature = "copysign", since = "1.35.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
pub const fn copysign(self, sign: f32) -> f32 {
// SAFETY: this is actually a safe intrinsic
unsafe { intrinsics::copysignf32(self, sign) }
Expand Down
Loading