File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
crates/proc-macro-srv/src Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,23 @@ impl ProcMacroSrv {
64
64
let macro_body = task. macro_body . to_subtree ( ) ;
65
65
let attributes = task. attributes . map ( |it| it. to_subtree ( ) ) ;
66
66
let result = crossbeam:: scope ( |s| {
67
- s. spawn ( |_| {
68
- expander
69
- . expand ( & task. macro_name , & macro_body, attributes. as_ref ( ) )
70
- . map ( |it| FlatTree :: new ( & it) )
71
- } )
72
- . join ( )
73
- . unwrap ( )
74
- } )
75
- . unwrap ( ) ;
67
+ let res = s
68
+ . spawn ( |_| {
69
+ expander
70
+ . expand ( & task. macro_name , & macro_body, attributes. as_ref ( ) )
71
+ . map ( |it| FlatTree :: new ( & it) )
72
+ } )
73
+ . join ( ) ;
74
+
75
+ match res {
76
+ Ok ( res) => res,
77
+ Err ( e) => std:: panic:: resume_unwind ( e) ,
78
+ }
79
+ } ) ;
80
+ let result = match result {
81
+ Ok ( result) => result,
82
+ Err ( e) => std:: panic:: resume_unwind ( e) ,
83
+ } ;
76
84
77
85
prev_env. rollback ( ) ;
78
86
You can’t perform that action at this time.
0 commit comments