We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 55d4813 + cb3d04c commit 8f683e9Copy full SHA for 8f683e9
crates/rust-analyzer/src/dispatch.rs
@@ -33,8 +33,10 @@ impl<'a> RequestDispatcher<'a> {
33
let global_state = panic::AssertUnwindSafe(&mut *self.global_state);
34
35
let result = panic::catch_unwind(move || {
36
- let _ = &global_state;
37
- let panic::AssertUnwindSafe(global_state) = global_state;
+ // Make sure that the whole AssertUnwindSafe is moved into the
+ // closure, and not just its field.
38
+ let panic::AssertUnwindSafe(global_state) = { global_state };
39
+
40
let _pctx = stdx::panic_context::enter(format!(
41
"\nversion: {}\nrequest: {} {:#?}",
42
env!("REV"),
0 commit comments