From 59536fb02384e47560f2580596e147fa1a39a100 Mon Sep 17 00:00:00 2001 From: Hans Kratz Date: Sat, 12 Feb 2022 11:27:55 +0100 Subject: [PATCH] Allow inlining of ensure_sufficient_stack() --- compiler/rustc_data_structures/src/stack.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_data_structures/src/stack.rs b/compiler/rustc_data_structures/src/stack.rs index a4964b7aa0c..3bdd6751232 100644 --- a/compiler/rustc_data_structures/src/stack.rs +++ b/compiler/rustc_data_structures/src/stack.rs @@ -12,6 +12,7 @@ const STACK_PER_RECURSION: usize = 1 * 1024 * 1024; // 1MB /// from this. /// /// Should not be sprinkled around carelessly, as it causes a little bit of overhead. +#[inline] pub fn ensure_sufficient_stack(f: impl FnOnce() -> R) -> R { stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f) }