Skip to content

Commit 7b74920

Browse files
committed
Stacker now handles miri using a noop impl itself
1 parent a18bd8a commit 7b74920

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

Diff for: Cargo.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2751,9 +2751,9 @@ dependencies = [
27512751

27522752
[[package]]
27532753
name = "psm"
2754-
version = "0.1.24"
2754+
version = "0.1.25"
27552755
source = "registry+https://github.com/rust-lang/crates.io-index"
2756-
checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810"
2756+
checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88"
27572757
dependencies = [
27582758
"cc",
27592759
]
@@ -4947,9 +4947,9 @@ dependencies = [
49474947

49484948
[[package]]
49494949
name = "stacker"
4950-
version = "0.1.17"
4950+
version = "0.1.18"
49514951
source = "registry+https://github.com/rust-lang/crates.io-index"
4952-
checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b"
4952+
checksum = "1d08feb8f695b465baed819b03c128dc23f57a694510ab1f06c77f763975685e"
49534953
dependencies = [
49544954
"cc",
49554955
"cfg-if",

Diff for: compiler/rustc_data_structures/src/stack.rs

-12
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ const STACK_PER_RECURSION: usize = 16 * 1024 * 1024; // 16MB
1717
///
1818
/// Should not be sprinkled around carelessly, as it causes a little bit of overhead.
1919
#[inline]
20-
#[cfg(not(miri))]
2120
pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
2221
stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f)
2322
}
24-
25-
/// Grows the stack on demand to prevent stack overflow. Call this in strategic locations
26-
/// to "break up" recursive calls. E.g. almost any call to `visit_expr` or equivalent can benefit
27-
/// from this.
28-
///
29-
/// Should not be sprinkled around carelessly, as it causes a little bit of overhead.
30-
#[cfg(miri)]
31-
#[inline]
32-
pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
33-
f()
34-
}

0 commit comments

Comments
 (0)