Skip to content

Commit 59536fb

Browse files
committed
Allow inlining of ensure_sufficient_stack()
1 parent 9cdefd7 commit 59536fb

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_data_structures/src

1 file changed

+1
-0
lines changed

compiler/rustc_data_structures/src/stack.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const STACK_PER_RECURSION: usize = 1 * 1024 * 1024; // 1MB
1212
/// from this.
1313
///
1414
/// Should not be sprinkled around carelessly, as it causes a little bit of overhead.
15+
#[inline]
1516
pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
1617
stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f)
1718
}

0 commit comments

Comments
 (0)