Skip to content

Commit 539947a

Browse files
committed
#[inline(always)] for functions which are essentially single function calls
1 parent 91bec3a commit 539947a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/core/src/num/nonzero.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
15431543
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
15441544
#[must_use = "this returns the result of the operation, \
15451545
without modifying the original"]
1546+
#[inline(always)]
15461547
pub const fn isqrt(self) -> Self {
15471548
let result = self.get().isqrt();
15481549

library/core/src/num/uint_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,7 @@ macro_rules! uint_impl {
26752675
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
26762676
#[must_use = "this returns the result of the operation, \
26772677
without modifying the original"]
2678-
#[inline]
2678+
#[inline(always)]
26792679
pub const fn isqrt(self) -> Self {
26802680
let result = crate::num::int_sqrt::$ActualT(self as $ActualT) as $SelfT;
26812681

0 commit comments

Comments
 (0)