File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " quasi"
3
- version = " 0.3.11 "
3
+ version = " 0.3.12 "
4
4
authors = [
" Erick Tryzelaar <[email protected] >" ]
5
5
license = " MIT/Apache-2.0"
6
6
description = " A quasi-quoting macro system"
Original file line number Diff line number Diff line change @@ -329,11 +329,20 @@ impl<'a> ExtParseUtils for ExtCtxt<'a> {
329
329
}
330
330
}
331
331
332
+ // A variant of 'try!' that panics on an Err. This is used as a crutch on the
333
+ // way towards a non-panic!-prone parser. It should be used for fatal parsing
334
+ // errors; eventually we plan to convert all code using panictry to just use
335
+ // normal try.
332
336
macro_rules! panictry {
333
337
( $e: expr) => ( {
338
+ use std:: result:: Result :: { Ok , Err } ;
339
+ use syntax:: errors:: FatalError ;
334
340
match $e {
335
341
Ok ( e) => e,
336
- Err ( err) => panic!( err)
342
+ Err ( mut e) => {
343
+ e. emit( ) ;
344
+ panic!( FatalError ) ;
345
+ }
337
346
}
338
347
} )
339
348
}
You can’t perform that action at this time.
0 commit comments