This repository was archived by the owner on May 28, 2025. It is now read-only.
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 {
94
94
if let Ok ( diagnostic) = serde_json:: from_str :: < Diagnostic > ( line) {
95
95
diagnostic. rendered
96
96
} 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
+ }
113
118
} else if serde_json:: from_str :: < ArtifactNotification > ( line) . is_ok ( ) {
114
119
// Ignore the notification.
115
120
None
You can’t perform that action at this time.
0 commit comments