Skip to content

Commit 65b685e

Browse files
committed
Add inline(always) to rt functions
1 parent 58c8823 commit 65b685e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: library/core/src/num/f32.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ impl f32 {
10341034
}
10351035
}
10361036

1037+
#[inline(always)] // See https://github.com/rust-lang/compiler-builtins/issues/491
10371038
fn rt_f32_to_u32(x: f32) -> u32 {
10381039
// SAFETY: `u32` is a plain old datatype so we can always... uh...
10391040
// ...look, just pretend you forgot what you just read.
@@ -1125,6 +1126,7 @@ impl f32 {
11251126
}
11261127
}
11271128

1129+
#[inline(always)] // See https://github.com/rust-lang/compiler-builtins/issues/491
11281130
fn rt_u32_to_f32(x: u32) -> f32 {
11291131
// SAFETY: `u32` is a plain old datatype so we can always... uh...
11301132
// ...look, just pretend you forgot what you just read.

Diff for: library/core/src/num/f64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,7 @@ impl f64 {
10271027
}
10281028
}
10291029

1030+
#[inline(always)] // See https://github.com/rust-lang/compiler-builtins/issues/491
10301031
fn rt_f64_to_u64(rt: f64) -> u64 {
10311032
// SAFETY: `u64` is a plain old datatype so we can always... uh...
10321033
// ...look, just pretend you forgot what you just read.
@@ -1123,6 +1124,7 @@ impl f64 {
11231124
}
11241125
}
11251126

1127+
#[inline(always)] // See https://github.com/rust-lang/compiler-builtins/issues/491
11261128
fn rt_u64_to_f64(rt: u64) -> f64 {
11271129
// SAFETY: `u64` is a plain old datatype so we can always... uh...
11281130
// ...look, just pretend you forgot what you just read.

0 commit comments

Comments
 (0)