Skip to content

Commit cb3d04c

Browse files
committed
1 parent 55d4813 commit cb3d04c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/rust-analyzer/src/dispatch.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ impl<'a> RequestDispatcher<'a> {
3333
let global_state = panic::AssertUnwindSafe(&mut *self.global_state);
3434

3535
let result = panic::catch_unwind(move || {
36-
let _ = &global_state;
37-
let panic::AssertUnwindSafe(global_state) = global_state;
36+
// Make sure that the whole AssertUnwindSafe is moved into the
37+
// closure, and not just its field.
38+
let panic::AssertUnwindSafe(global_state) = { global_state };
39+
3840
let _pctx = stdx::panic_context::enter(format!(
3941
"\nversion: {}\nrequest: {} {:#?}",
4042
env!("REV"),

0 commit comments

Comments
 (0)