You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #11494 - ehuss:stabilize-diagnostic-width, r=weihanglo
Stabilize terminal-width
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.
Closesrust-lang/rust#84673
Copy file name to clipboardExpand all lines: src/doc/src/reference/unstable.md
+6-38
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,6 @@ Each new feature described below should explain how to use it.
70
70
*[public-dependency](#public-dependency) — Allows dependencies to be classified as either public or private.
71
71
* Output behavior
72
72
*[out-dir](#out-dir) — Adds a directory where artifacts are copied to.
73
-
*[terminal-width](#terminal-width) — Tells rustc the width of the terminal so that long diagnostic messages can be truncated to be more readable.
74
73
*[Different binary name](#different-binary-name) — Assign a name to the built binary that is separate from the crate name.
75
74
* Compile behavior
76
75
*[mtime-on-use](#mtime-on-use) — Updates the last-modified timestamp on every dependency every time it is used, to provide a mechanism to delete unused artifacts.
@@ -723,43 +722,6 @@ The default value is `"remote"`.
723
722
724
723
The value may also take a URL for a custom location.
0 commit comments