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