File tree Expand file tree Collapse file tree 1 file changed +21
-16
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -94,22 +94,27 @@ pub fn extract_rendered(output: &str) -> String {
9494 if let Ok ( diagnostic) = serde_json:: from_str :: < Diagnostic > ( line) {
9595 diagnostic. rendered
9696 } else if let Ok ( report) = serde_json:: from_str :: < FutureIncompatReport > ( line) {
97- Some ( format ! (
98- "Future incompatibility report: {}" ,
99- report
100- . future_incompat_report
101- . into_iter( )
102- . map( |item| {
103- format!(
104- "Future breakage date: {}, diagnostic:\n {}" ,
105- item. future_breakage_date. unwrap_or_else( || "None" . to_string( ) ) ,
106- item. diagnostic
107- . rendered
108- . unwrap_or_else( || "Not rendered" . to_string( ) )
109- )
110- } )
111- . collect:: <String >( )
112- ) )
97+ if report. future_incompat_report . is_empty ( ) {
98+ None
99+ } else {
100+ Some ( format ! (
101+ "Future incompatibility report: {}" ,
102+ report
103+ . future_incompat_report
104+ . into_iter( )
105+ . map( |item| {
106+ format!(
107+ "Future breakage date: {}, diagnostic:\n {}" ,
108+ item. future_breakage_date
109+ . unwrap_or_else( || "None" . to_string( ) ) ,
110+ item. diagnostic
111+ . rendered
112+ . unwrap_or_else( || "Not rendered" . to_string( ) )
113+ )
114+ } )
115+ . collect:: <String >( )
116+ ) )
117+ }
113118 } else if serde_json:: from_str :: < ArtifactNotification > ( line) . is_ok ( ) {
114119 // Ignore the notification.
115120 None
You can’t perform that action at this time.
0 commit comments