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_middle/src | |
| parent | fc5af1813307d25a84d633f21e2e53c9376eb547 (diff) | |
| download | rust-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.rs | 6 |
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() } )+ } |
