File tree 1 file changed +4
-4
lines changed
src/tools/compiletest/src
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ struct DiagnosticCode {
57
57
58
58
pub fn parse_output ( file_name : & str , output : & str ) -> Vec < Error > {
59
59
output. lines ( )
60
- . flat_map ( |line| parse_line ( file_name, line) )
60
+ . flat_map ( |line| parse_line ( file_name, line, output ) )
61
61
. collect ( )
62
62
}
63
63
64
- fn parse_line ( file_name : & str , line : & str ) -> Vec < Error > {
64
+ fn parse_line ( file_name : & str , line : & str , output : & str ) -> Vec < Error > {
65
65
// The compiler sometimes intermingles non-JSON stuff into the
66
66
// output. This hack just skips over such lines. Yuck.
67
67
if line. chars ( ) . next ( ) == Some ( '{' ) {
@@ -72,8 +72,8 @@ fn parse_line(file_name: &str, line: &str) -> Vec<Error> {
72
72
expected_errors
73
73
}
74
74
Err ( error) => {
75
- panic ! ( "failed to decode compiler output as json: `{}` when parsing : {}" , error ,
76
- line) ;
75
+ panic ! ( "failed to decode compiler output as json: `{}`\n output: {} \n line : {}" ,
76
+ error , line, output ) ;
77
77
}
78
78
}
79
79
} else {
You can’t perform that action at this time.
0 commit comments