@@ -1040,6 +1040,7 @@ fn default_emitter(
10401040 source_map : & Lrc < source_map:: SourceMap > ,
10411041 emitter_dest : Option < Box < dyn Write + Send > > ,
10421042) -> Box < dyn Emitter + sync:: Send > {
1043+ let external_macro_backtrace = sopts. debugging_opts . external_macro_backtrace ;
10431044 match ( sopts. error_format , emitter_dest) {
10441045 ( config:: ErrorOutputType :: HumanReadable ( kind) , dst) => {
10451046 let ( short, color_config) = kind. unzip ( ) ;
@@ -1048,6 +1049,7 @@ fn default_emitter(
10481049 let emitter = AnnotateSnippetEmitterWriter :: new (
10491050 Some ( source_map. clone ( ) ) ,
10501051 short,
1052+ external_macro_backtrace,
10511053 ) ;
10521054 Box :: new ( emitter. ui_testing ( sopts. debugging_opts . ui_testing ) )
10531055 } else {
@@ -1058,6 +1060,7 @@ fn default_emitter(
10581060 short,
10591061 sopts. debugging_opts . teach ,
10601062 sopts. debugging_opts . terminal_width ,
1063+ external_macro_backtrace,
10611064 ) ,
10621065 Some ( dst) => EmitterWriter :: new (
10631066 dst,
@@ -1066,6 +1069,7 @@ fn default_emitter(
10661069 false , // no teach messages when writing to a buffer
10671070 false , // no colors when writing to a buffer
10681071 None , // no terminal width
1072+ external_macro_backtrace,
10691073 ) ,
10701074 } ;
10711075 Box :: new ( emitter. ui_testing ( sopts. debugging_opts . ui_testing ) )
@@ -1077,6 +1081,7 @@ fn default_emitter(
10771081 source_map. clone ( ) ,
10781082 pretty,
10791083 json_rendered,
1084+ external_macro_backtrace,
10801085 ) . ui_testing ( sopts. debugging_opts . ui_testing ) ,
10811086 ) ,
10821087 ( config:: ErrorOutputType :: Json { pretty, json_rendered } , Some ( dst) ) => Box :: new (
@@ -1086,6 +1091,7 @@ fn default_emitter(
10861091 source_map. clone ( ) ,
10871092 pretty,
10881093 json_rendered,
1094+ external_macro_backtrace,
10891095 ) . ui_testing ( sopts. debugging_opts . ui_testing ) ,
10901096 ) ,
10911097 }
@@ -1382,10 +1388,10 @@ pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! {
13821388 let emitter: Box < dyn Emitter + sync:: Send > = match output {
13831389 config:: ErrorOutputType :: HumanReadable ( kind) => {
13841390 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 ) )
13861392 }
13871393 config:: ErrorOutputType :: Json { pretty, json_rendered } =>
1388- Box :: new ( JsonEmitter :: basic ( pretty, json_rendered) ) ,
1394+ Box :: new ( JsonEmitter :: basic ( pretty, json_rendered, false ) ) ,
13891395 } ;
13901396 let handler = errors:: Handler :: with_emitter ( true , None , emitter) ;
13911397 handler. emit ( & MultiSpan :: new ( ) , msg, errors:: Level :: Fatal ) ;
@@ -1396,10 +1402,10 @@ pub fn early_warn(output: config::ErrorOutputType, msg: &str) {
13961402 let emitter: Box < dyn Emitter + sync:: Send > = match output {
13971403 config:: ErrorOutputType :: HumanReadable ( kind) => {
13981404 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 ) )
14001406 }
14011407 config:: ErrorOutputType :: Json { pretty, json_rendered } =>
1402- Box :: new ( JsonEmitter :: basic ( pretty, json_rendered) ) ,
1408+ Box :: new ( JsonEmitter :: basic ( pretty, json_rendered, false ) ) ,
14031409 } ;
14041410 let handler = errors:: Handler :: with_emitter ( true , None , emitter) ;
14051411 handler. emit ( & MultiSpan :: new ( ) , msg, errors:: Level :: Warning ) ;
0 commit comments