File tree 2 files changed +17
-17
lines changed
2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -31,23 +31,6 @@ mod tests;
31
31
32
32
pub const MACRO_ARGUMENTS : Option < & ' static str > = Some ( "macro arguments" ) ;
33
33
34
- // A variant of 'panictry!' that works on a Vec<Diagnostic> instead of a single DiagnosticBuilder.
35
- macro_rules! panictry_buffer {
36
- ( $handler: expr, $e: expr) => ( {
37
- use std:: result:: Result :: { Ok , Err } ;
38
- use errors:: FatalError ;
39
- match $e {
40
- Ok ( e) => e,
41
- Err ( errs) => {
42
- for e in errs {
43
- $handler. emit_diagnostic( & e) ;
44
- }
45
- FatalError . raise( )
46
- }
47
- }
48
- } )
49
- }
50
-
51
34
#[ macro_export]
52
35
macro_rules! unwrap_or {
53
36
( $opt: expr, $default: expr) => {
Original file line number Diff line number Diff line change @@ -59,6 +59,23 @@ pub enum DirectoryOwnership {
59
59
// uses a HOF to parse anything, and <source> includes file and
60
60
// `source_str`.
61
61
62
+ /// A variant of 'panictry!' that works on a Vec<Diagnostic> instead of a single DiagnosticBuilder.
63
+ macro_rules! panictry_buffer {
64
+ ( $handler: expr, $e: expr) => ( {
65
+ use std:: result:: Result :: { Ok , Err } ;
66
+ use errors:: FatalError ;
67
+ match $e {
68
+ Ok ( e) => e,
69
+ Err ( errs) => {
70
+ for e in errs {
71
+ $handler. emit_diagnostic( & e) ;
72
+ }
73
+ FatalError . raise( )
74
+ }
75
+ }
76
+ } )
77
+ }
78
+
62
79
pub fn parse_crate_from_file < ' a > ( input : & Path , sess : & ' a ParseSess ) -> PResult < ' a , ast:: Crate > {
63
80
let mut parser = new_parser_from_file ( sess, input) ;
64
81
parser. parse_crate_mod ( )
You can’t perform that action at this time.
0 commit comments