about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/stack.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-13 17:33:14 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-21 13:54:45 +0000
commit7b74920388f71379662962acdc12233b9458be03 (patch)
tree57de193ef39ec59ab88a1a1d47a2a47ab6a8ec84 /compiler/rustc_data_structures/src/stack.rs
parenta18bd8acfc32dbfbbe150cd52eecf24e67fb69b6 (diff)
downloadrust-7b74920388f71379662962acdc12233b9458be03.tar.gz
rust-7b74920388f71379662962acdc12233b9458be03.zip
Stacker now handles miri using a noop impl itself
Diffstat (limited to 'compiler/rustc_data_structures/src/stack.rs')
-rw-r--r--compiler/rustc_data_structures/src/stack.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_data_structures/src/stack.rs b/compiler/rustc_data_structures/src/stack.rs
index 102b3640911..3d6d0003483 100644
--- a/compiler/rustc_data_structures/src/stack.rs
+++ b/compiler/rustc_data_structures/src/stack.rs
@@ -17,18 +17,6 @@ const STACK_PER_RECURSION: usize = 16 * 1024 * 1024; // 16MB
 ///
 /// Should not be sprinkled around carelessly, as it causes a little bit of overhead.
 #[inline]
-#[cfg(not(miri))]
 pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
     stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f)
 }
-
-/// Grows the stack on demand to prevent stack overflow. Call this in strategic locations
-/// to "break up" recursive calls. E.g. almost any call to `visit_expr` or equivalent can benefit
-/// from this.
-///
-/// Should not be sprinkled around carelessly, as it causes a little bit of overhead.
-#[cfg(miri)]
-#[inline]
-pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
-    f()
-}