@@ -2197,86 +2197,86 @@ pub unsafe fn fmuladdf128(a: f128, b: f128, c: f128) -> f128;
2197
2197
/// [`f16::floor`](../../std/primitive.f16.html#method.floor)
2198
2198
#[ rustc_intrinsic]
2199
2199
#[ rustc_nounwind]
2200
- pub unsafe fn floorf16 ( x : f16 ) -> f16 ;
2200
+ pub const unsafe fn floorf16 ( x : f16 ) -> f16 ;
2201
2201
/// Returns the largest integer less than or equal to an `f32`.
2202
2202
///
2203
2203
/// The stabilized version of this intrinsic is
2204
2204
/// [`f32::floor`](../../std/primitive.f32.html#method.floor)
2205
2205
#[ rustc_intrinsic]
2206
2206
#[ rustc_nounwind]
2207
- pub unsafe fn floorf32 ( x : f32 ) -> f32 ;
2207
+ pub const unsafe fn floorf32 ( x : f32 ) -> f32 ;
2208
2208
/// Returns the largest integer less than or equal to an `f64`.
2209
2209
///
2210
2210
/// The stabilized version of this intrinsic is
2211
2211
/// [`f64::floor`](../../std/primitive.f64.html#method.floor)
2212
2212
#[ rustc_intrinsic]
2213
2213
#[ rustc_nounwind]
2214
- pub unsafe fn floorf64 ( x : f64 ) -> f64 ;
2214
+ pub const unsafe fn floorf64 ( x : f64 ) -> f64 ;
2215
2215
/// Returns the largest integer less than or equal to an `f128`.
2216
2216
///
2217
2217
/// The stabilized version of this intrinsic is
2218
2218
/// [`f128::floor`](../../std/primitive.f128.html#method.floor)
2219
2219
#[ rustc_intrinsic]
2220
2220
#[ rustc_nounwind]
2221
- pub unsafe fn floorf128 ( x : f128 ) -> f128 ;
2221
+ pub const unsafe fn floorf128 ( x : f128 ) -> f128 ;
2222
2222
2223
2223
/// Returns the smallest integer greater than or equal to an `f16`.
2224
2224
///
2225
2225
/// The stabilized version of this intrinsic is
2226
2226
/// [`f16::ceil`](../../std/primitive.f16.html#method.ceil)
2227
2227
#[ rustc_intrinsic]
2228
2228
#[ rustc_nounwind]
2229
- pub unsafe fn ceilf16 ( x : f16 ) -> f16 ;
2229
+ pub const unsafe fn ceilf16 ( x : f16 ) -> f16 ;
2230
2230
/// Returns the smallest integer greater than or equal to an `f32`.
2231
2231
///
2232
2232
/// The stabilized version of this intrinsic is
2233
2233
/// [`f32::ceil`](../../std/primitive.f32.html#method.ceil)
2234
2234
#[ rustc_intrinsic]
2235
2235
#[ rustc_nounwind]
2236
- pub unsafe fn ceilf32 ( x : f32 ) -> f32 ;
2236
+ pub const unsafe fn ceilf32 ( x : f32 ) -> f32 ;
2237
2237
/// Returns the smallest integer greater than or equal to an `f64`.
2238
2238
///
2239
2239
/// The stabilized version of this intrinsic is
2240
2240
/// [`f64::ceil`](../../std/primitive.f64.html#method.ceil)
2241
2241
#[ rustc_intrinsic]
2242
2242
#[ rustc_nounwind]
2243
- pub unsafe fn ceilf64 ( x : f64 ) -> f64 ;
2243
+ pub const unsafe fn ceilf64 ( x : f64 ) -> f64 ;
2244
2244
/// Returns the smallest integer greater than or equal to an `f128`.
2245
2245
///
2246
2246
/// The stabilized version of this intrinsic is
2247
2247
/// [`f128::ceil`](../../std/primitive.f128.html#method.ceil)
2248
2248
#[ rustc_intrinsic]
2249
2249
#[ rustc_nounwind]
2250
- pub unsafe fn ceilf128 ( x : f128 ) -> f128 ;
2250
+ pub const unsafe fn ceilf128 ( x : f128 ) -> f128 ;
2251
2251
2252
2252
/// Returns the integer part of an `f16`.
2253
2253
///
2254
2254
/// The stabilized version of this intrinsic is
2255
2255
/// [`f16::trunc`](../../std/primitive.f16.html#method.trunc)
2256
2256
#[ rustc_intrinsic]
2257
2257
#[ rustc_nounwind]
2258
- pub unsafe fn truncf16 ( x : f16 ) -> f16 ;
2258
+ pub const unsafe fn truncf16 ( x : f16 ) -> f16 ;
2259
2259
/// Returns the integer part of an `f32`.
2260
2260
///
2261
2261
/// The stabilized version of this intrinsic is
2262
2262
/// [`f32::trunc`](../../std/primitive.f32.html#method.trunc)
2263
2263
#[ rustc_intrinsic]
2264
2264
#[ rustc_nounwind]
2265
- pub unsafe fn truncf32 ( x : f32 ) -> f32 ;
2265
+ pub const unsafe fn truncf32 ( x : f32 ) -> f32 ;
2266
2266
/// Returns the integer part of an `f64`.
2267
2267
///
2268
2268
/// The stabilized version of this intrinsic is
2269
2269
/// [`f64::trunc`](../../std/primitive.f64.html#method.trunc)
2270
2270
#[ rustc_intrinsic]
2271
2271
#[ rustc_nounwind]
2272
- pub unsafe fn truncf64 ( x : f64 ) -> f64 ;
2272
+ pub const unsafe fn truncf64 ( x : f64 ) -> f64 ;
2273
2273
/// Returns the integer part of an `f128`.
2274
2274
///
2275
2275
/// The stabilized version of this intrinsic is
2276
2276
/// [`f128::trunc`](../../std/primitive.f128.html#method.trunc)
2277
2277
#[ rustc_intrinsic]
2278
2278
#[ rustc_nounwind]
2279
- pub unsafe fn truncf128 ( x : f128 ) -> f128 ;
2279
+ pub const unsafe fn truncf128 ( x : f128 ) -> f128 ;
2280
2280
2281
2281
/// Returns the nearest integer to an `f16`. Rounds half-way cases to the number with an even
2282
2282
/// least significant digit.
@@ -2285,7 +2285,7 @@ pub unsafe fn truncf128(x: f128) -> f128;
2285
2285
/// [`f16::round_ties_even`](../../std/primitive.f16.html#method.round_ties_even)
2286
2286
#[ rustc_intrinsic]
2287
2287
#[ rustc_nounwind]
2288
- pub fn round_ties_even_f16 ( x : f16 ) -> f16 ;
2288
+ pub const fn round_ties_even_f16 ( x : f16 ) -> f16 ;
2289
2289
2290
2290
/// Returns the nearest integer to an `f32`. Rounds half-way cases to the number with an even
2291
2291
/// least significant digit.
@@ -2294,10 +2294,11 @@ pub fn round_ties_even_f16(x: f16) -> f16;
2294
2294
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
2295
2295
#[ rustc_intrinsic]
2296
2296
#[ rustc_nounwind]
2297
- pub fn round_ties_even_f32 ( x : f32 ) -> f32 ;
2297
+ pub const fn round_ties_even_f32 ( x : f32 ) -> f32 ;
2298
2298
2299
2299
/// Provided for compatibility with stdarch. DO NOT USE.
2300
2300
#[ inline( always) ]
2301
+ #[ rustc_allow_const_fn_unstable( core_intrinsics) ]
2301
2302
pub unsafe fn rintf32 ( x : f32 ) -> f32 {
2302
2303
round_ties_even_f32 ( x)
2303
2304
}
@@ -2309,11 +2310,12 @@ pub unsafe fn rintf32(x: f32) -> f32 {
2309
2310
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
2310
2311
#[ rustc_intrinsic]
2311
2312
#[ rustc_nounwind]
2312
- pub fn round_ties_even_f64 ( x : f64 ) -> f64 ;
2313
+ pub const fn round_ties_even_f64 ( x : f64 ) -> f64 ;
2313
2314
2314
2315
/// Provided for compatibility with stdarch. DO NOT USE.
2315
2316
#[ 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 {
2317
2319
round_ties_even_f64 ( x)
2318
2320
}
2319
2321
@@ -2324,36 +2326,36 @@ pub unsafe fn rintf64(x: f64) -> f64 {
2324
2326
/// [`f128::round_ties_even`](../../std/primitive.f128.html#method.round_ties_even)
2325
2327
#[ rustc_intrinsic]
2326
2328
#[ rustc_nounwind]
2327
- pub fn round_ties_even_f128 ( x : f128 ) -> f128 ;
2329
+ pub const fn round_ties_even_f128 ( x : f128 ) -> f128 ;
2328
2330
2329
2331
/// Returns the nearest integer to an `f16`. Rounds half-way cases away from zero.
2330
2332
///
2331
2333
/// The stabilized version of this intrinsic is
2332
2334
/// [`f16::round`](../../std/primitive.f16.html#method.round)
2333
2335
#[ rustc_intrinsic]
2334
2336
#[ rustc_nounwind]
2335
- pub unsafe fn roundf16 ( x : f16 ) -> f16 ;
2337
+ pub const unsafe fn roundf16 ( x : f16 ) -> f16 ;
2336
2338
/// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
2337
2339
///
2338
2340
/// The stabilized version of this intrinsic is
2339
2341
/// [`f32::round`](../../std/primitive.f32.html#method.round)
2340
2342
#[ rustc_intrinsic]
2341
2343
#[ rustc_nounwind]
2342
- pub unsafe fn roundf32 ( x : f32 ) -> f32 ;
2344
+ pub const unsafe fn roundf32 ( x : f32 ) -> f32 ;
2343
2345
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
2344
2346
///
2345
2347
/// The stabilized version of this intrinsic is
2346
2348
/// [`f64::round`](../../std/primitive.f64.html#method.round)
2347
2349
#[ rustc_intrinsic]
2348
2350
#[ rustc_nounwind]
2349
- pub unsafe fn roundf64 ( x : f64 ) -> f64 ;
2351
+ pub const unsafe fn roundf64 ( x : f64 ) -> f64 ;
2350
2352
/// Returns the nearest integer to an `f128`. Rounds half-way cases away from zero.
2351
2353
///
2352
2354
/// The stabilized version of this intrinsic is
2353
2355
/// [`f128::round`](../../std/primitive.f128.html#method.round)
2354
2356
#[ rustc_intrinsic]
2355
2357
#[ rustc_nounwind]
2356
- pub unsafe fn roundf128 ( x : f128 ) -> f128 ;
2358
+ pub const unsafe fn roundf128 ( x : f128 ) -> f128 ;
2357
2359
2358
2360
/// Float addition that allows optimizations based on algebraic rules.
2359
2361
/// May assume inputs are finite.
0 commit comments