Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit caf4f11

Browse files
committed
Add #[rustc_intrinsic_const_stable_indirect] to float rounding
intrinsics
1 parent ca01e7d commit caf4f11

File tree

1 file changed

+20
-0
lines changed
  • library/core/src/intrinsics

1 file changed

+20
-0
lines changed

‎library/core/src/intrinsics/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,27 +1379,31 @@ pub unsafe fn fmuladdf128(a: f128, b: f128, c: f128) -> f128;
13791379
///
13801380
/// The stabilized version of this intrinsic is
13811381
/// [`f16::floor`](../../std/primitive.f16.html#method.floor)
1382+
#[rustc_intrinsic_const_stable_indirect]
13821383
#[rustc_intrinsic]
13831384
#[rustc_nounwind]
13841385
pub const unsafe fn floorf16(x: f16) -> f16;
13851386
/// Returns the largest integer less than or equal to an `f32`.
13861387
///
13871388
/// The stabilized version of this intrinsic is
13881389
/// [`f32::floor`](../../std/primitive.f32.html#method.floor)
1390+
#[rustc_intrinsic_const_stable_indirect]
13891391
#[rustc_intrinsic]
13901392
#[rustc_nounwind]
13911393
pub const unsafe fn floorf32(x: f32) -> f32;
13921394
/// Returns the largest integer less than or equal to an `f64`.
13931395
///
13941396
/// The stabilized version of this intrinsic is
13951397
/// [`f64::floor`](../../std/primitive.f64.html#method.floor)
1398+
#[rustc_intrinsic_const_stable_indirect]
13961399
#[rustc_intrinsic]
13971400
#[rustc_nounwind]
13981401
pub const unsafe fn floorf64(x: f64) -> f64;
13991402
/// Returns the largest integer less than or equal to an `f128`.
14001403
///
14011404
/// The stabilized version of this intrinsic is
14021405
/// [`f128::floor`](../../std/primitive.f128.html#method.floor)
1406+
#[rustc_intrinsic_const_stable_indirect]
14031407
#[rustc_intrinsic]
14041408
#[rustc_nounwind]
14051409
pub const unsafe fn floorf128(x: f128) -> f128;
@@ -1408,27 +1412,31 @@ pub const unsafe fn floorf128(x: f128) -> f128;
14081412
///
14091413
/// The stabilized version of this intrinsic is
14101414
/// [`f16::ceil`](../../std/primitive.f16.html#method.ceil)
1415+
#[rustc_intrinsic_const_stable_indirect]
14111416
#[rustc_intrinsic]
14121417
#[rustc_nounwind]
14131418
pub const unsafe fn ceilf16(x: f16) -> f16;
14141419
/// Returns the smallest integer greater than or equal to an `f32`.
14151420
///
14161421
/// The stabilized version of this intrinsic is
14171422
/// [`f32::ceil`](../../std/primitive.f32.html#method.ceil)
1423+
#[rustc_intrinsic_const_stable_indirect]
14181424
#[rustc_intrinsic]
14191425
#[rustc_nounwind]
14201426
pub const unsafe fn ceilf32(x: f32) -> f32;
14211427
/// Returns the smallest integer greater than or equal to an `f64`.
14221428
///
14231429
/// The stabilized version of this intrinsic is
14241430
/// [`f64::ceil`](../../std/primitive.f64.html#method.ceil)
1431+
#[rustc_intrinsic_const_stable_indirect]
14251432
#[rustc_intrinsic]
14261433
#[rustc_nounwind]
14271434
pub const unsafe fn ceilf64(x: f64) -> f64;
14281435
/// Returns the smallest integer greater than or equal to an `f128`.
14291436
///
14301437
/// The stabilized version of this intrinsic is
14311438
/// [`f128::ceil`](../../std/primitive.f128.html#method.ceil)
1439+
#[rustc_intrinsic_const_stable_indirect]
14321440
#[rustc_intrinsic]
14331441
#[rustc_nounwind]
14341442
pub const unsafe fn ceilf128(x: f128) -> f128;
@@ -1437,27 +1445,31 @@ pub const unsafe fn ceilf128(x: f128) -> f128;
14371445
///
14381446
/// The stabilized version of this intrinsic is
14391447
/// [`f16::trunc`](../../std/primitive.f16.html#method.trunc)
1448+
#[rustc_intrinsic_const_stable_indirect]
14401449
#[rustc_intrinsic]
14411450
#[rustc_nounwind]
14421451
pub const unsafe fn truncf16(x: f16) -> f16;
14431452
/// Returns the integer part of an `f32`.
14441453
///
14451454
/// The stabilized version of this intrinsic is
14461455
/// [`f32::trunc`](../../std/primitive.f32.html#method.trunc)
1456+
#[rustc_intrinsic_const_stable_indirect]
14471457
#[rustc_intrinsic]
14481458
#[rustc_nounwind]
14491459
pub const unsafe fn truncf32(x: f32) -> f32;
14501460
/// Returns the integer part of an `f64`.
14511461
///
14521462
/// The stabilized version of this intrinsic is
14531463
/// [`f64::trunc`](../../std/primitive.f64.html#method.trunc)
1464+
#[rustc_intrinsic_const_stable_indirect]
14541465
#[rustc_intrinsic]
14551466
#[rustc_nounwind]
14561467
pub const unsafe fn truncf64(x: f64) -> f64;
14571468
/// Returns the integer part of an `f128`.
14581469
///
14591470
/// The stabilized version of this intrinsic is
14601471
/// [`f128::trunc`](../../std/primitive.f128.html#method.trunc)
1472+
#[rustc_intrinsic_const_stable_indirect]
14611473
#[rustc_intrinsic]
14621474
#[rustc_nounwind]
14631475
pub const unsafe fn truncf128(x: f128) -> f128;
@@ -1467,6 +1479,7 @@ pub const unsafe fn truncf128(x: f128) -> f128;
14671479
///
14681480
/// The stabilized version of this intrinsic is
14691481
/// [`f16::round_ties_even`](../../std/primitive.f16.html#method.round_ties_even)
1482+
#[rustc_intrinsic_const_stable_indirect]
14701483
#[rustc_intrinsic]
14711484
#[rustc_nounwind]
14721485
pub const fn round_ties_even_f16(x: f16) -> f16;
@@ -1476,6 +1489,7 @@ pub const fn round_ties_even_f16(x: f16) -> f16;
14761489
///
14771490
/// The stabilized version of this intrinsic is
14781491
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
1492+
#[rustc_intrinsic_const_stable_indirect]
14791493
#[rustc_intrinsic]
14801494
#[rustc_nounwind]
14811495
pub const fn round_ties_even_f32(x: f32) -> f32;
@@ -1485,6 +1499,7 @@ pub const fn round_ties_even_f32(x: f32) -> f32;
14851499
///
14861500
/// The stabilized version of this intrinsic is
14871501
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
1502+
#[rustc_intrinsic_const_stable_indirect]
14881503
#[rustc_intrinsic]
14891504
#[rustc_nounwind]
14901505
pub const fn round_ties_even_f64(x: f64) -> f64;
@@ -1494,6 +1509,7 @@ pub const fn round_ties_even_f64(x: f64) -> f64;
14941509
///
14951510
/// The stabilized version of this intrinsic is
14961511
/// [`f128::round_ties_even`](../../std/primitive.f128.html#method.round_ties_even)
1512+
#[rustc_intrinsic_const_stable_indirect]
14971513
#[rustc_intrinsic]
14981514
#[rustc_nounwind]
14991515
pub const fn round_ties_even_f128(x: f128) -> f128;
@@ -1502,27 +1518,31 @@ pub const fn round_ties_even_f128(x: f128) -> f128;
15021518
///
15031519
/// The stabilized version of this intrinsic is
15041520
/// [`f16::round`](../../std/primitive.f16.html#method.round)
1521+
#[rustc_intrinsic_const_stable_indirect]
15051522
#[rustc_intrinsic]
15061523
#[rustc_nounwind]
15071524
pub const unsafe fn roundf16(x: f16) -> f16;
15081525
/// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
15091526
///
15101527
/// The stabilized version of this intrinsic is
15111528
/// [`f32::round`](../../std/primitive.f32.html#method.round)
1529+
#[rustc_intrinsic_const_stable_indirect]
15121530
#[rustc_intrinsic]
15131531
#[rustc_nounwind]
15141532
pub const unsafe fn roundf32(x: f32) -> f32;
15151533
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
15161534
///
15171535
/// The stabilized version of this intrinsic is
15181536
/// [`f64::round`](../../std/primitive.f64.html#method.round)
1537+
#[rustc_intrinsic_const_stable_indirect]
15191538
#[rustc_intrinsic]
15201539
#[rustc_nounwind]
15211540
pub const unsafe fn roundf64(x: f64) -> f64;
15221541
/// Returns the nearest integer to an `f128`. Rounds half-way cases away from zero.
15231542
///
15241543
/// The stabilized version of this intrinsic is
15251544
/// [`f128::round`](../../std/primitive.f128.html#method.round)
1545+
#[rustc_intrinsic_const_stable_indirect]
15261546
#[rustc_intrinsic]
15271547
#[rustc_nounwind]
15281548
pub const unsafe fn roundf128(x: f128) -> f128;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /