@@ -904,10 +904,13 @@ pub fn build_session_with_codemap(sopts: config::Options,
904
904
905
905
let emitter: Box < Emitter > = match ( sopts. error_format , emitter_dest) {
906
906
( 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 ) )
908
911
}
909
912
( 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 ) )
911
914
}
912
915
( config:: ErrorOutputType :: Json ( pretty) , None ) => {
913
916
Box :: new ( JsonEmitter :: stderr ( Some ( registry) , codemap. clone ( ) , pretty) )
@@ -916,10 +919,10 @@ pub fn build_session_with_codemap(sopts: config::Options,
916
919
Box :: new ( JsonEmitter :: new ( dst, Some ( registry) , codemap. clone ( ) , pretty) )
917
920
}
918
921
( 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 ) )
920
923
}
921
924
( 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 ) )
923
926
}
924
927
} ;
925
928
@@ -1095,11 +1098,11 @@ pub enum IncrCompSession {
1095
1098
pub fn early_error ( output : config:: ErrorOutputType , msg : & str ) -> ! {
1096
1099
let emitter: Box < Emitter > = match output {
1097
1100
config:: ErrorOutputType :: HumanReadable ( color_config) => {
1098
- Box :: new ( EmitterWriter :: stderr ( color_config, None , false ) )
1101
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , false , false ) )
1099
1102
}
1100
1103
config:: ErrorOutputType :: Json ( pretty) => Box :: new ( JsonEmitter :: basic ( pretty) ) ,
1101
1104
config:: ErrorOutputType :: Short ( color_config) => {
1102
- Box :: new ( EmitterWriter :: stderr ( color_config, None , true ) )
1105
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , true , false ) )
1103
1106
}
1104
1107
} ;
1105
1108
let handler = errors:: Handler :: with_emitter ( true , false , emitter) ;
@@ -1110,11 +1113,11 @@ pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! {
1110
1113
pub fn early_warn ( output : config:: ErrorOutputType , msg : & str ) {
1111
1114
let emitter: Box < Emitter > = match output {
1112
1115
config:: ErrorOutputType :: HumanReadable ( color_config) => {
1113
- Box :: new ( EmitterWriter :: stderr ( color_config, None , false ) )
1116
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , false , false ) )
1114
1117
}
1115
1118
config:: ErrorOutputType :: Json ( pretty) => Box :: new ( JsonEmitter :: basic ( pretty) ) ,
1116
1119
config:: ErrorOutputType :: Short ( color_config) => {
1117
- Box :: new ( EmitterWriter :: stderr ( color_config, None , true ) )
1120
+ Box :: new ( EmitterWriter :: stderr ( color_config, None , true , false ) )
1118
1121
}
1119
1122
} ;
1120
1123
let handler = errors:: Handler :: with_emitter ( true , false , emitter) ;
0 commit comments