about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/stack.rs
diff options
context:
space:
mode:
authorHans Kratz <hans@appfour.com>2022-02-12 11:27:55 +0100
committerHans Kratz <hans@appfour.com>2022-02-12 11:30:04 +0100
commit59536fb02384e47560f2580596e147fa1a39a100 (patch)
tree69fa5fa1c6f54bff5662d5bd91e5f250d937bae8 /compiler/rustc_data_structures/src/stack.rs
parent9cdefd763b910ffd1d42233a8c752ab5fd84ca4d (diff)
downloadrust-59536fb02384e47560f2580596e147fa1a39a100.tar.gz
rust-59536fb02384e47560f2580596e147fa1a39a100.zip
Allow inlining of ensure_sufficient_stack()
Diffstat (limited to 'compiler/rustc_data_structures/src/stack.rs')
-rw-r--r--compiler/rustc_data_structures/src/stack.rs1
1 files changed, 1 insertions, 0 deletions
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<R>(f: impl FnOnce() -> R) -> R {
     stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f)
 }