]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir-ty/src/tls.rs
feat: Handle operators like their trait functions in the IDE
[rust.git] / crates / hir-ty / src / tls.rs
index 0600fd7c6d9359647e5eada5a5700269fd116f7b..547850b021c3cef706d1181ce8f9a16ea93d9822 100644 (file)
@@ -104,7 +104,7 @@ mod unsafe_tls {
     use crate::db::HirDatabase;
     use scoped_tls::scoped_thread_local;
 
-    scoped_thread_local!(static PROGRAM: DebugContext);
+    scoped_thread_local!(static PROGRAM: DebugContext<'_>);
 
     pub(crate) fn with_current_program<R>(
         op: impl for<'a> FnOnce(Option<&'a DebugContext<'a>>) -> R,
@@ -127,7 +127,7 @@ pub(crate) fn set_current_program<OP, R>(p: &dyn HirDatabase, op: OP) -> R
         // `with_current_program`, which hides the lifetime through the `for`
         // type.
         let static_p: &DebugContext<'static> =
-            unsafe { std::mem::transmute::<&DebugContext, &DebugContext<'static>>(&ctx) };
+            unsafe { std::mem::transmute::<&DebugContext<'_>, &DebugContext<'static>>(&ctx) };
         PROGRAM.set(static_p, op)
     }
 }