about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2025-07-21 20:13:35 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2025-07-24 13:21:25 -0500
commitb8d628c1e12c51c9adf4fecf1aadd74e11c48d76 (patch)
treedd0b88051fe2b22a5f3462c22bf990c7ef14da53 /compiler/rustc_middle/src
parentfc5af1813307d25a84d633f21e2e53c9376eb547 (diff)
downloadrust-b8d628c1e12c51c9adf4fecf1aadd74e11c48d76.tar.gz
rust-b8d628c1e12c51c9adf4fecf1aadd74e11c48d76.zip
Use LocalKey<Cell> methods more
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index 9ee64df0ad0..fd4472e1f96 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -86,7 +86,7 @@ macro_rules! define_helper {
 
             impl $helper {
                 pub fn new() -> $helper {
-                    $helper($tl.with(|c| c.replace(true)))
+                    $helper($tl.replace(true))
                 }
             }
 
@@ -100,12 +100,12 @@ macro_rules! define_helper {
 
             impl Drop for $helper {
                 fn drop(&mut self) {
-                    $tl.with(|c| c.set(self.0))
+                    $tl.set(self.0)
                 }
             }
 
             pub fn $name() -> bool {
-                $tl.with(|c| c.get())
+                $tl.get()
             }
         )+
     }