mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Run cargo fix --edition-idioms
This commit is contained in:
parent
23d25a3094
commit
816f7fe12a
230 changed files with 888 additions and 888 deletions
|
@ -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 @@ mod unsafe_tls {
|
|||
// `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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue