From 79d7dc0e49713647f5ddf521b42267893fb51b49 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 8 Jul 2022 07:57:40 -0700 Subject: [PATCH] Update terminal-width flag. --- src/cargo/core/compiler/mod.rs | 4 ++-- tests/testsuite/build.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 622e8733d40..bfab9cd6581 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -793,11 +793,11 @@ fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder) { ) { // Terminal width explicitly provided - only useful for testing. (Some(Some(width)), _) => { - cmd.arg(format!("-Zterminal-width={}", width)); + cmd.arg(format!("--diagnostic-width={}", width)); } // Terminal width was not explicitly provided but flag was provided - common case. (Some(None), Some(width)) => { - cmd.arg(format!("-Zterminal-width={}", width)); + cmd.arg(format!("--diagnostic-width={}", width)); } // User didn't opt-in. _ => (), diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 1b89648ed93..cbd9408a869 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -6107,7 +6107,7 @@ fn target_directory_backup_exclusion() { #[cargo_test] fn simple_terminal_width() { if !is_nightly() { - // --terminal-width is unstable + // --diagnostic-width is stabilized in 1.64 return; } let p = project()