@@ -904,10 +904,13 @@ pub fn build_session_with_codemap(sopts: config::Options,
904904
905905 let emitter: Box < Emitter > = match ( sopts. error_format , emitter_dest) {
906906 ( config:: ErrorOutputType :: HumanReadable ( color_config) , None ) => {
907- Box :: new ( EmitterWriter :: stderr ( color_config, Some ( codemap. clone ( ) ) , false ) )
907+ Box :: new ( EmitterWriter :: stderr ( color_config,
908+ Some ( codemap. clone ( ) ) ,
909+ false ,
910+ sopts. debugging_opts . teach ) )
908911 }
909912 ( config:: ErrorOutputType :: HumanReadable ( _) , Some ( dst) ) => {
910- Box :: new ( EmitterWriter :: new ( dst, Some ( codemap. clone ( ) ) , false ) )
913+ Box :: new ( EmitterWriter :: new ( dst, Some ( codemap. clone ( ) ) , false , false ) )
911914 }
912915 ( config:: ErrorOutputType :: Json ( pretty) , None ) => {
913916 Box :: new ( JsonEmitter :: stderr ( Some ( registry) , codemap. clone ( ) , pretty) )
@@ -916,10 +919,10 @@ pub fn build_session_with_codemap(sopts: config::Options,
916919 Box :: new ( JsonEmitter :: new ( dst, Some ( registry) , codemap. clone ( ) , pretty) )
917920 }
918921 ( config:: ErrorOutputType :: Short ( color_config) , None ) => {
919- Box :: new ( EmitterWriter :: stderr ( color_config, Some ( codemap. clone ( ) ) , true ) )
922+ Box :: new ( EmitterWriter :: stderr ( color_config, Some ( codemap. clone ( ) ) , true , false ) )
920923 }
921924 ( config:: ErrorOutputType :: Short ( _) , Some ( dst) ) => {
922- Box :: new ( EmitterWriter :: new ( dst, Some ( codemap. clone ( ) ) , true ) )
925+ Box :: new ( EmitterWriter :: new ( dst, Some ( codemap. clone ( ) ) , true , false ) )
923926 }
924927 } ;
925928
@@ -1095,11 +1098,11 @@ pub enum IncrCompSession {
10951098pub fn early_error ( output : config:: ErrorOutputType , msg : & str ) -> ! {
10961099 let emitter: Box < Emitter > = match output {
10971100 config:: ErrorOutputType :: HumanReadable ( color_config) => {
1098- Box :: new ( EmitterWriter :: stderr ( color_config, None , false ) )
1101+ Box :: new ( EmitterWriter :: stderr ( color_config, None , false , false ) )
10991102 }
11001103 config:: ErrorOutputType :: Json ( pretty) => Box :: new ( JsonEmitter :: basic ( pretty) ) ,
11011104 config:: ErrorOutputType :: Short ( color_config) => {
1102- Box :: new ( EmitterWriter :: stderr ( color_config, None , true ) )
1105+ Box :: new ( EmitterWriter :: stderr ( color_config, None , true , false ) )
11031106 }
11041107 } ;
11051108 let handler = errors:: Handler :: with_emitter ( true , false , emitter) ;
@@ -1110,11 +1113,11 @@ pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! {
11101113pub fn early_warn ( output : config:: ErrorOutputType , msg : & str ) {
11111114 let emitter: Box < Emitter > = match output {
11121115 config:: ErrorOutputType :: HumanReadable ( color_config) => {
1113- Box :: new ( EmitterWriter :: stderr ( color_config, None , false ) )
1116+ Box :: new ( EmitterWriter :: stderr ( color_config, None , false , false ) )
11141117 }
11151118 config:: ErrorOutputType :: Json ( pretty) => Box :: new ( JsonEmitter :: basic ( pretty) ) ,
11161119 config:: ErrorOutputType :: Short ( color_config) => {
1117- Box :: new ( EmitterWriter :: stderr ( color_config, None , true ) )
1120+ Box :: new ( EmitterWriter :: stderr ( color_config, None , true , false ) )
11181121 }
11191122 } ;
11201123 let handler = errors:: Handler :: with_emitter ( true , false , emitter) ;
0 commit comments