File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -353,11 +353,17 @@ fn print_parser_error(
353353 SvParserError :: Preprocess ( Some ( ( path, pos) ) ) => {
354354 printer. print_preprocess_error ( & path, pos, oneline) ?;
355355 }
356- SvParserError :: Include { source : x } => {
357- if let SvParserError :: File { path : x , .. } = * x {
358- printer. print_error ( & format ! ( "failed to include '{}'" , x . to_string_lossy ( ) ) ) ?;
356+ SvParserError :: Include { source } => match * source {
357+ SvParserError :: File { source : _ , path } => {
358+ printer. print_error ( & format ! ( "failed to include '{}'" , path . display ( ) ) ) ?;
359359 }
360- }
360+ SvParserError :: DefineNotFound ( define) => {
361+ printer. print_error ( & format ! ( "definition not found for '{}'" , define) ) ?;
362+ }
363+ _ => {
364+ printer. print_error ( & format ! ( "{}" , source) ) ?;
365+ }
366+ } ,
361367 SvParserError :: ReadUtf8 ( path) => {
362368 printer. print_error ( & format ! ( "file '{}' is not valid UTF-8" , path. display( ) ) ) ?;
363369 }
You can’t perform that action at this time.
0 commit comments