Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tls.rs')
| -rw-r--r-- | crates/hir-ty/src/tls.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tls.rs b/crates/hir-ty/src/tls.rs index f53409af2b..fe4cf7a3da 100644 --- a/crates/hir-ty/src/tls.rs +++ b/crates/hir-ty/src/tls.rs @@ -10,6 +10,7 @@ use crate::{ }; use hir_def::{AdtId, ItemContainerId, Lookup, TypeAliasId}; +#[allow(unused)] pub(crate) use unsafe_tls::{set_current_program, with_current_program}; pub(crate) struct DebugContext<'a>(&'a dyn HirDatabase); @@ -136,6 +137,7 @@ mod unsafe_tls { if PROGRAM.is_set() { PROGRAM.with(|prog| op(Some(prog))) } else { op(None) } } + #[allow(dead_code)] pub(crate) fn set_current_program<OP, R>(p: &dyn HirDatabase, op: OP) -> R where OP: FnOnce() -> R, |