diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-07-21 20:13:35 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-07-24 13:21:25 -0500 |
| commit | b8d628c1e12c51c9adf4fecf1aadd74e11c48d76 (patch) | |
| tree | dd0b88051fe2b22a5f3462c22bf990c7ef14da53 /compiler/rustc_query_system | |
| parent | fc5af1813307d25a84d633f21e2e53c9376eb547 (diff) | |
| download | rust-b8d628c1e12c51c9adf4fecf1aadd74e11c48d76.tar.gz rust-b8d628c1e12c51c9adf4fecf1aadd74e11c48d76.zip | |
Use LocalKey<Cell> methods more
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index 06e59eb4ccc..e74de5edc42 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -720,7 +720,7 @@ fn incremental_verify_ich_failed<Tcx>( static INSIDE_VERIFY_PANIC: Cell<bool> = const { Cell::new(false) }; }; - let old_in_panic = INSIDE_VERIFY_PANIC.with(|in_panic| in_panic.replace(true)); + let old_in_panic = INSIDE_VERIFY_PANIC.replace(true); if old_in_panic { tcx.sess().dcx().emit_err(crate::error::Reentrant); @@ -739,7 +739,7 @@ fn incremental_verify_ich_failed<Tcx>( panic!("Found unstable fingerprints for {dep_node:?}: {}", result()); } - INSIDE_VERIFY_PANIC.with(|in_panic| in_panic.set(old_in_panic)); + INSIDE_VERIFY_PANIC.set(old_in_panic); } /// Ensure that either this query has all green inputs or been executed. |
