Skip to content

Commit 45b4314

Browse files
authored
Rollup merge of rust-lang#137374 - bjorn3:remove_stacker_miri_special_case, r=compiler-errors
Stacker now handles miri using a noop impl itself Reverts a no longer necessary change from rust-lang#136580.
2 parents 0f56361 + 7b74920 commit 45b4314

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

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",

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)