aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-10 10:06:42 +0000
committerAleksey Kladov <[email protected]>2019-01-10 10:06:42 +0000
commit86bc898a2fa5818eac4b87714b59970023acc60f (patch)
tree15efd65c0bceaded1f6d6c0241a21444b3bc7579 /crates/ra_db/src
parentf72c031eb9a15f25834a7980008db764ff2867a0 (diff)
explain why we use resume_unwind
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r--crates/ra_db/src/cancellation.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_db/src/cancellation.rs b/crates/ra_db/src/cancellation.rs
index f7077b992..32a268553 100644
--- a/crates/ra_db/src/cancellation.rs
+++ b/crates/ra_db/src/cancellation.rs
@@ -29,6 +29,8 @@ impl Canceled {
29 } 29 }
30 30
31 pub fn throw() -> ! { 31 pub fn throw() -> ! {
32 // We use resume and not panic here to avoid running the panic
33 // hook (that is, to avoid collecting and printing backtrace).
32 std::panic::resume_unwind(Box::new(Canceled::new())) 34 std::panic::resume_unwind(Box::new(Canceled::new()))
33 } 35 }
34} 36}