about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/passes.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-02-07 16:11:40 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-09 15:25:45 +1100
commitf7b3e39502783c82d4a8d9e02f59aa4268d15dbf (patch)
treeec181e78c1795cb42e8d5cfcea8225894ce839f9 /compiler/rustc_interface/src/passes.rs
parentef934d9b632b8ac00276558824664c104b92b5f0 (diff)
downloadrust-f7b3e39502783c82d4a8d9e02f59aa4268d15dbf.tar.gz
rust-f7b3e39502783c82d4a8d9e02f59aa4268d15dbf.zip
Simplify `tls::enter_context`.
Diffstat (limited to 'compiler/rustc_interface/src/passes.rs')
-rw-r--r--compiler/rustc_interface/src/passes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 2a373ebc132..304c3257456 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -748,7 +748,7 @@ impl<'tcx> QueryContext<'tcx> {
         F: FnOnce(TyCtxt<'tcx>) -> R,
     {
         let icx = ty::tls::ImplicitCtxt::new(self.gcx);
-        ty::tls::enter_context(&icx, |_| f(icx.tcx))
+        ty::tls::enter_context(&icx, || f(icx.tcx))
     }
 }