about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/stack.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-21 19:57:50 +0000
committerbors <bors@rust-lang.org>2025-02-21 19:57:50 +0000
commit794c12416b2138064af1f2746646973fafd9419d (patch)
treed76a0a0653625e059639a98e302da022f10a2431 /compiler/rustc_data_structures/src/stack.rs
parent71e06b9c59d6af50fdc55aed75620493d29baf98 (diff)
parentcfc2d111ed7d45a1f99672211a99ba105ae4e4de (diff)
downloadrust-794c12416b2138064af1f2746646973fafd9419d.tar.gz
rust-794c12416b2138064af1f2746646973fafd9419d.zip
Auto merge of #137397 - matthiaskrgr:rollup-ls2pilo, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #132876 (rustdoc book: acknowledge --document-hidden-items)
 - #136148 (Optionally add type names to `TypeId`s.)
 - #136609 (libcore/net: `IpAddr::as_octets()`)
 - #137336 (Stabilise `os_str_display`)
 - #137350 (Move methods from Map to TyCtxt, part 3.)
 - #137353 (Implement `read_buf` for WASI stdin)
 - #137361 (Refactor `OperandRef::extract_field` to prep for MCP838)
 - #137367 (Do not exempt nonexistent platforms from platform policy)
 - #137374 (Stacker now handles miri using a noop impl itself)
 - #137392 (remove few unused fields)

r? `@ghost`
`@rustbot` modify labels: rollup
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()
-}