Skip to content

Commit

Permalink
Update terminal-width flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 8, 2022
1 parent 6867277 commit 79d7dc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
_ => (),
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 79d7dc0

Please sign in to comment.