From 1a74f25f9026f152fdba6f85ec617c02205d98eb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 23 Oct 2020 15:18:33 +0200 Subject: Fix panic context --- crates/rust-analyzer/src/dispatch.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/rust-analyzer/src') diff --git a/crates/rust-analyzer/src/dispatch.rs b/crates/rust-analyzer/src/dispatch.rs index 9c8815e29e8..7a87515e9ae 100644 --- a/crates/rust-analyzer/src/dispatch.rs +++ b/crates/rust-analyzer/src/dispatch.rs @@ -34,7 +34,7 @@ impl<'a> RequestDispatcher<'a> { }; let world = panic::AssertUnwindSafe(&mut *self.global_state); let response = panic::catch_unwind(move || { - stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); + let _pctx = stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); let result = f(world.0, params); result_to_response::(id, result) }) @@ -64,7 +64,7 @@ impl<'a> RequestDispatcher<'a> { let world = self.global_state.snapshot(); move || { - let _ctx = + let _pctx = stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); let result = f(world, params); Task::Response(result_to_response::(id, result)) @@ -160,7 +160,7 @@ impl<'a> NotificationDispatcher<'a> { return Ok(self); } }; - stdx::panic_context::enter(format!("notification: {}", N::METHOD)); + let _pctx = stdx::panic_context::enter(format!("notification: {}", N::METHOD)); f(self.global_state, params)?; Ok(self) } -- cgit 1.4.1-3-g733a5