@@ -1116,10 +1116,6 @@ pub fn run_cargo(builder: &Builder<'_>,
11161116                } , 
11171117                ..
11181118            }  => ( filenames,  crate_types) , 
1119-             CargoMessage :: CompilerMessage  {  message }  => { 
1120-                 eprintln ! ( "{}" ,  message. rendered) ; 
1121-                 return ; 
1122-             } 
11231119            _ => return , 
11241120        } ; 
11251121        for  filename in  filenames { 
@@ -1256,8 +1252,12 @@ pub fn stream_cargo(
12561252    } 
12571253    // Instruct Cargo to give us json messages on stdout, critically leaving 
12581254    // stderr as piped so we can get those pretty colors. 
1259-     cargo. arg ( "--message-format" ) . arg ( "json" ) 
1260-          . stdout ( Stdio :: piped ( ) ) ; 
1255+     let  mut  message_format = String :: from ( "json-render-diagnostics" ) ; 
1256+     if  let  Some ( s)  = & builder. config . rustc_error_format   { 
1257+         message_format. push_str ( ",json-diagnostic-" ) ; 
1258+         message_format. push_str ( s) ; 
1259+     } 
1260+     cargo. arg ( "--message-format" ) . arg ( message_format) . stdout ( Stdio :: piped ( ) ) ; 
12611261
12621262    for  arg in  tail_args { 
12631263        cargo. arg ( arg) ; 
@@ -1310,12 +1310,4 @@ pub enum CargoMessage<'a> {
13101310    BuildScriptExecuted  { 
13111311        package_id :  Cow < ' a ,  str > , 
13121312    } , 
1313-     CompilerMessage  { 
1314-         message :  ClippyMessage < ' a > 
1315-     } 
1316- } 
1317- 
1318- #[ derive( Deserialize ) ]  
1319- pub  struct  ClippyMessage < ' a >  { 
1320-     rendered :  Cow < ' a ,  str > , 
13211313} 
0 commit comments