@@ -1040,6 +1040,7 @@ fn default_emitter(
1040
1040
source_map : & Lrc < source_map:: SourceMap > ,
1041
1041
emitter_dest : Option < Box < dyn Write + Send > > ,
1042
1042
) -> Box < dyn Emitter + sync:: Send > {
1043
+ let external_macro_backtrace = sopts. debugging_opts . external_macro_backtrace ;
1043
1044
match ( sopts. error_format , emitter_dest) {
1044
1045
( config:: ErrorOutputType :: HumanReadable ( kind) , dst) => {
1045
1046
let ( short, color_config) = kind. unzip ( ) ;
@@ -1048,6 +1049,7 @@ fn default_emitter(
1048
1049
let emitter = AnnotateSnippetEmitterWriter :: new (
1049
1050
Some ( source_map. clone ( ) ) ,
1050
1051
short,
1052
+ external_macro_backtrace,
1051
1053
) ;
1052
1054
Box :: new ( emitter. ui_testing ( sopts. debugging_opts . ui_testing ) )
1053
1055
} else {
@@ -1058,6 +1060,7 @@ fn default_emitter(
1058
1060
short,
1059
1061
sopts. debugging_opts . teach ,
1060
1062
sopts. debugging_opts . terminal_width ,
1063
+ external_macro_backtrace,
1061
1064
) ,
1062
1065
Some ( dst) => EmitterWriter :: new (
1063
1066
dst,
@@ -1066,6 +1069,7 @@ fn default_emitter(
1066
1069
false , // no teach messages when writing to a buffer
1067
1070
false , // no colors when writing to a buffer
1068
1071
None , // no terminal width
1072
+ external_macro_backtrace,
1069
1073
) ,
1070
1074
} ;
1071
1075
Box :: new ( emitter. ui_testing ( sopts. debugging_opts . ui_testing ) )
@@ -1077,6 +1081,7 @@ fn default_emitter(
1077
1081
source_map. clone ( ) ,
1078
1082
pretty,
1079
1083
json_rendered,
1084
+ external_macro_backtrace,
1080
1085
) . ui_testing ( sopts. debugging_opts . ui_testing ) ,
1081
1086
) ,
1082
1087
( config:: ErrorOutputType :: Json { pretty, json_rendered } , Some ( dst) ) => Box :: new (
@@ -1086,6 +1091,7 @@ fn default_emitter(
1086
1091
source_map. clone ( ) ,
1087
1092
pretty,
1088
1093
json_rendered,
1094
+ external_macro_backtrace,
1089
1095
) . ui_testing ( sopts. debugging_opts . ui_testing ) ,
1090
1096
) ,
1091
1097
}
@@ -1382,10 +1388,10 @@ pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! {
1382
1388
let emitter: Box < dyn Emitter + sync:: Send > = match output {
1383
1389
config:: ErrorOutputType :: HumanReadable ( kind) => {
1384
1390
let ( short, color_config) = kind. unzip ( ) ;
1385
- Box :: new ( EmitterWriter :: stderr ( color_config, None , short, false , None ) )
1391
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , short, false , None , false ) )
1386
1392
}
1387
1393
config:: ErrorOutputType :: Json { pretty, json_rendered } =>
1388
- Box :: new ( JsonEmitter :: basic ( pretty, json_rendered) ) ,
1394
+ Box :: new ( JsonEmitter :: basic ( pretty, json_rendered, false ) ) ,
1389
1395
} ;
1390
1396
let handler = errors:: Handler :: with_emitter ( true , None , emitter) ;
1391
1397
handler. emit ( & MultiSpan :: new ( ) , msg, errors:: Level :: Fatal ) ;
@@ -1396,10 +1402,10 @@ pub fn early_warn(output: config::ErrorOutputType, msg: &str) {
1396
1402
let emitter: Box < dyn Emitter + sync:: Send > = match output {
1397
1403
config:: ErrorOutputType :: HumanReadable ( kind) => {
1398
1404
let ( short, color_config) = kind. unzip ( ) ;
1399
- Box :: new ( EmitterWriter :: stderr ( color_config, None , short, false , None ) )
1405
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , short, false , None , false ) )
1400
1406
}
1401
1407
config:: ErrorOutputType :: Json { pretty, json_rendered } =>
1402
- Box :: new ( JsonEmitter :: basic ( pretty, json_rendered) ) ,
1408
+ Box :: new ( JsonEmitter :: basic ( pretty, json_rendered, false ) ) ,
1403
1409
} ;
1404
1410
let handler = errors:: Handler :: with_emitter ( true , None , emitter) ;
1405
1411
handler. emit ( & MultiSpan :: new ( ) , msg, errors:: Level :: Warning ) ;
0 commit comments