File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub use crate::{
15
15
} ,
16
16
} ;
17
17
18
- pub trait CheckCanceled : panic :: RefUnwindSafe {
18
+ pub trait CheckCanceled {
19
19
/// Aborts current query if there are pending changes.
20
20
///
21
21
/// rust-analyzer needs to be able to answer semantic questions about the
@@ -36,14 +36,15 @@ pub trait CheckCanceled: panic::RefUnwindSafe {
36
36
Self : Sized ,
37
37
F : FnOnce ( & Self ) -> T + panic:: UnwindSafe ,
38
38
{
39
- panic:: catch_unwind ( || f ( self ) ) . map_err ( |err| match err. downcast :: < Canceled > ( ) {
39
+ let this = panic:: AssertUnwindSafe ( self ) ;
40
+ panic:: catch_unwind ( || f ( * this) ) . map_err ( |err| match err. downcast :: < Canceled > ( ) {
40
41
Ok ( canceled) => * canceled,
41
42
Err ( payload) => panic:: resume_unwind ( payload) ,
42
43
} )
43
44
}
44
45
}
45
46
46
- impl < T : salsa:: Database + panic :: RefUnwindSafe > CheckCanceled for T {
47
+ impl < T : salsa:: Database > CheckCanceled for T {
47
48
fn check_canceled ( & self ) {
48
49
if self . salsa_runtime ( ) . is_current_revision_canceled ( ) {
49
50
Canceled :: throw ( )
You can’t perform that action at this time.
0 commit comments