Skip to content

Commit 69ec5cc

Browse files
committed
refactor(future): Group shell output
1 parent 18a1760 commit 69ec5cc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/cargo/core/compiler/future_incompat.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,6 @@ pub fn save_and_display_report(
428428
.collect();
429429
let package_vers: Vec<_> = package_ids.iter().map(|pid| pid.to_string()).collect();
430430

431-
if should_display_message || bcx.build_config.future_incompat_report {
432-
drop(bcx.gctx.shell().warn(&format!(
433-
"the following packages contain code that will be rejected by a future \
434-
version of Rust: {}",
435-
package_vers.join(", ")
436-
)));
437-
}
438-
439431
let updated_versions = get_updates(bcx.ws, &package_ids).unwrap_or(String::new());
440432

441433
let update_message = if !updated_versions.is_empty() {
@@ -503,6 +495,13 @@ https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch
503495
let saved_report_id =
504496
current_reports.save_report(bcx.ws, suggestion_message.clone(), rendered_report);
505497

498+
if should_display_message || bcx.build_config.future_incompat_report {
499+
drop(bcx.gctx.shell().warn(&format!(
500+
"the following packages contain code that will be rejected by a future \
501+
version of Rust: {}",
502+
package_vers.join(", ")
503+
)));
504+
}
506505
if bcx.build_config.future_incompat_report {
507506
if !suggestion_message.is_empty() {
508507
drop(bcx.gctx.shell().note(&suggestion_message));

0 commit comments

Comments
 (0)