@@ -2197,86 +2197,86 @@ pub unsafe fn fmuladdf128(a: f128, b: f128, c: f128) -> f128;
21972197/// [`f16::floor`](../../std/primitive.f16.html#method.floor)
21982198#[ rustc_intrinsic]
21992199#[ rustc_nounwind]
2200- pub unsafe fn floorf16 ( x : f16 ) -> f16 ;
2200+ pub const unsafe fn floorf16 ( x : f16 ) -> f16 ;
22012201/// Returns the largest integer less than or equal to an `f32`.
22022202///
22032203/// The stabilized version of this intrinsic is
22042204/// [`f32::floor`](../../std/primitive.f32.html#method.floor)
22052205#[ rustc_intrinsic]
22062206#[ rustc_nounwind]
2207- pub unsafe fn floorf32 ( x : f32 ) -> f32 ;
2207+ pub const unsafe fn floorf32 ( x : f32 ) -> f32 ;
22082208/// Returns the largest integer less than or equal to an `f64`.
22092209///
22102210/// The stabilized version of this intrinsic is
22112211/// [`f64::floor`](../../std/primitive.f64.html#method.floor)
22122212#[ rustc_intrinsic]
22132213#[ rustc_nounwind]
2214- pub unsafe fn floorf64 ( x : f64 ) -> f64 ;
2214+ pub const unsafe fn floorf64 ( x : f64 ) -> f64 ;
22152215/// Returns the largest integer less than or equal to an `f128`.
22162216///
22172217/// The stabilized version of this intrinsic is
22182218/// [`f128::floor`](../../std/primitive.f128.html#method.floor)
22192219#[ rustc_intrinsic]
22202220#[ rustc_nounwind]
2221- pub unsafe fn floorf128 ( x : f128 ) -> f128 ;
2221+ pub const unsafe fn floorf128 ( x : f128 ) -> f128 ;
22222222
22232223/// Returns the smallest integer greater than or equal to an `f16`.
22242224///
22252225/// The stabilized version of this intrinsic is
22262226/// [`f16::ceil`](../../std/primitive.f16.html#method.ceil)
22272227#[ rustc_intrinsic]
22282228#[ rustc_nounwind]
2229- pub unsafe fn ceilf16 ( x : f16 ) -> f16 ;
2229+ pub const unsafe fn ceilf16 ( x : f16 ) -> f16 ;
22302230/// Returns the smallest integer greater than or equal to an `f32`.
22312231///
22322232/// The stabilized version of this intrinsic is
22332233/// [`f32::ceil`](../../std/primitive.f32.html#method.ceil)
22342234#[ rustc_intrinsic]
22352235#[ rustc_nounwind]
2236- pub unsafe fn ceilf32 ( x : f32 ) -> f32 ;
2236+ pub const unsafe fn ceilf32 ( x : f32 ) -> f32 ;
22372237/// Returns the smallest integer greater than or equal to an `f64`.
22382238///
22392239/// The stabilized version of this intrinsic is
22402240/// [`f64::ceil`](../../std/primitive.f64.html#method.ceil)
22412241#[ rustc_intrinsic]
22422242#[ rustc_nounwind]
2243- pub unsafe fn ceilf64 ( x : f64 ) -> f64 ;
2243+ pub const unsafe fn ceilf64 ( x : f64 ) -> f64 ;
22442244/// Returns the smallest integer greater than or equal to an `f128`.
22452245///
22462246/// The stabilized version of this intrinsic is
22472247/// [`f128::ceil`](../../std/primitive.f128.html#method.ceil)
22482248#[ rustc_intrinsic]
22492249#[ rustc_nounwind]
2250- pub unsafe fn ceilf128 ( x : f128 ) -> f128 ;
2250+ pub const unsafe fn ceilf128 ( x : f128 ) -> f128 ;
22512251
22522252/// Returns the integer part of an `f16`.
22532253///
22542254/// The stabilized version of this intrinsic is
22552255/// [`f16::trunc`](../../std/primitive.f16.html#method.trunc)
22562256#[ rustc_intrinsic]
22572257#[ rustc_nounwind]
2258- pub unsafe fn truncf16 ( x : f16 ) -> f16 ;
2258+ pub const unsafe fn truncf16 ( x : f16 ) -> f16 ;
22592259/// Returns the integer part of an `f32`.
22602260///
22612261/// The stabilized version of this intrinsic is
22622262/// [`f32::trunc`](../../std/primitive.f32.html#method.trunc)
22632263#[ rustc_intrinsic]
22642264#[ rustc_nounwind]
2265- pub unsafe fn truncf32 ( x : f32 ) -> f32 ;
2265+ pub const unsafe fn truncf32 ( x : f32 ) -> f32 ;
22662266/// Returns the integer part of an `f64`.
22672267///
22682268/// The stabilized version of this intrinsic is
22692269/// [`f64::trunc`](../../std/primitive.f64.html#method.trunc)
22702270#[ rustc_intrinsic]
22712271#[ rustc_nounwind]
2272- pub unsafe fn truncf64 ( x : f64 ) -> f64 ;
2272+ pub const unsafe fn truncf64 ( x : f64 ) -> f64 ;
22732273/// Returns the integer part of an `f128`.
22742274///
22752275/// The stabilized version of this intrinsic is
22762276/// [`f128::trunc`](../../std/primitive.f128.html#method.trunc)
22772277#[ rustc_intrinsic]
22782278#[ rustc_nounwind]
2279- pub unsafe fn truncf128 ( x : f128 ) -> f128 ;
2279+ pub const unsafe fn truncf128 ( x : f128 ) -> f128 ;
22802280
22812281/// Returns the nearest integer to an `f16`. Rounds half-way cases to the number with an even
22822282/// least significant digit.
@@ -2285,7 +2285,7 @@ pub unsafe fn truncf128(x: f128) -> f128;
22852285/// [`f16::round_ties_even`](../../std/primitive.f16.html#method.round_ties_even)
22862286#[ rustc_intrinsic]
22872287#[ rustc_nounwind]
2288- pub fn round_ties_even_f16 ( x : f16 ) -> f16 ;
2288+ pub const fn round_ties_even_f16 ( x : f16 ) -> f16 ;
22892289
22902290/// Returns the nearest integer to an `f32`. Rounds half-way cases to the number with an even
22912291/// least significant digit.
@@ -2294,10 +2294,11 @@ pub fn round_ties_even_f16(x: f16) -> f16;
22942294/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
22952295#[ rustc_intrinsic]
22962296#[ rustc_nounwind]
2297- pub fn round_ties_even_f32 ( x : f32 ) -> f32 ;
2297+ pub const fn round_ties_even_f32 ( x : f32 ) -> f32 ;
22982298
22992299/// Provided for compatibility with stdarch. DO NOT USE.
23002300#[ inline( always) ]
2301+ #[ rustc_allow_const_fn_unstable( core_intrinsics) ]
23012302pub unsafe fn rintf32 ( x : f32 ) -> f32 {
23022303 round_ties_even_f32 ( x)
23032304}
@@ -2309,11 +2310,12 @@ pub unsafe fn rintf32(x: f32) -> f32 {
23092310/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
23102311#[ rustc_intrinsic]
23112312#[ rustc_nounwind]
2312- pub fn round_ties_even_f64 ( x : f64 ) -> f64 ;
2313+ pub const fn round_ties_even_f64 ( x : f64 ) -> f64 ;
23132314
23142315/// Provided for compatibility with stdarch. DO NOT USE.
23152316#[ inline( always) ]
2316- pub unsafe fn rintf64 ( x : f64 ) -> f64 {
2317+ #[ rustc_allow_const_fn_unstable( core_intrinsics) ]
2318+ pub const unsafe fn rintf64 ( x : f64 ) -> f64 {
23172319 round_ties_even_f64 ( x)
23182320}
23192321
@@ -2324,36 +2326,36 @@ pub unsafe fn rintf64(x: f64) -> f64 {
23242326/// [`f128::round_ties_even`](../../std/primitive.f128.html#method.round_ties_even)
23252327#[ rustc_intrinsic]
23262328#[ rustc_nounwind]
2327- pub fn round_ties_even_f128 ( x : f128 ) -> f128 ;
2329+ pub const fn round_ties_even_f128 ( x : f128 ) -> f128 ;
23282330
23292331/// Returns the nearest integer to an `f16`. Rounds half-way cases away from zero.
23302332///
23312333/// The stabilized version of this intrinsic is
23322334/// [`f16::round`](../../std/primitive.f16.html#method.round)
23332335#[ rustc_intrinsic]
23342336#[ rustc_nounwind]
2335- pub unsafe fn roundf16 ( x : f16 ) -> f16 ;
2337+ pub const unsafe fn roundf16 ( x : f16 ) -> f16 ;
23362338/// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
23372339///
23382340/// The stabilized version of this intrinsic is
23392341/// [`f32::round`](../../std/primitive.f32.html#method.round)
23402342#[ rustc_intrinsic]
23412343#[ rustc_nounwind]
2342- pub unsafe fn roundf32 ( x : f32 ) -> f32 ;
2344+ pub const unsafe fn roundf32 ( x : f32 ) -> f32 ;
23432345/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
23442346///
23452347/// The stabilized version of this intrinsic is
23462348/// [`f64::round`](../../std/primitive.f64.html#method.round)
23472349#[ rustc_intrinsic]
23482350#[ rustc_nounwind]
2349- pub unsafe fn roundf64 ( x : f64 ) -> f64 ;
2351+ pub const unsafe fn roundf64 ( x : f64 ) -> f64 ;
23502352/// Returns the nearest integer to an `f128`. Rounds half-way cases away from zero.
23512353///
23522354/// The stabilized version of this intrinsic is
23532355/// [`f128::round`](../../std/primitive.f128.html#method.round)
23542356#[ rustc_intrinsic]
23552357#[ rustc_nounwind]
2356- pub unsafe fn roundf128 ( x : f128 ) -> f128 ;
2358+ pub const unsafe fn roundf128 ( x : f128 ) -> f128 ;
23572359
23582360/// Float addition that allows optimizations based on algebraic rules.
23592361/// May assume inputs are finite.
0 commit comments