1

Stabilize terminal-width by ehuss · Pull Request #11494 · rust-lang/cargo · GitH...

 1 year ago
source link: https://github.com/rust-lang/cargo/pull/11494
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Contributor

@ehuss ehuss commented Dec 17, 2022

This stabilized the passing of the --diagnostic-width flag to rustc and rustdoc so that they will format diagnostics to fit within the terminal size. Previously they always assume the width is 140. The diagnostics are trimmed with ... to elide parts of extra-long lines.

In cases where the width isn't known (such as not when used on a tty, or with mintty), then cargo does not pass the flag and the default of 140 is still used.

At this time there is no way for the user to override the width (unlike with the progress bar width). That can be added in the future if there is demand. rust-lang/rust#84673 (comment) contains some thoughts on some different ideas.

Closes rust-lang/rust#84673

weihanglo reacted with rocket emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK