Skip to content

Commit abbe431

Browse files
committed
fix(core): don't inline the inner functions of const_for_times!
Implements a work-around for infinite recursion in the MIR inliner ([rust-lang/rust#100476][1]). Since they are only called at compile time, this change will not cause a runtime performance or code size regression. [1]: rust-lang/rust#100476
1 parent 0f9a1c1 commit abbe431

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/r3_core/src/utils/for_times.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,13 @@ macro_rules! const_for_times {
146146
) => {{
147147
use $crate::utils::for_times::{Nat, U, IncrSat};
148148

149-
#[inline(always)]
150149
const fn iter_inner<
151150
$( $iter_gparam $($iter_gparam_bounds)* ,)*
152151
$i: Nat
153152
>($ctx_param: $iter_ctx_ty) {
154153
$($iter)*
155154
}
156155

157-
#[inline(always)]
158156
const fn iter_outer<
159157
$( $iter_gparam $($iter_gparam_bounds)* ,)*
160158
Counter: Nat,

0 commit comments

Comments
 (0)