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
Rollup merge of rust-lang#102218 - ehuss:rustc-flags, r=JohnTitor
Document some missing command-line arguments
The rustc command-line arguments docs should document all of the stable arguments for rustc. Two were missing, `--force-warn` which was somewhat documented in the lint-levels chapter, but should also include a mention in the arguments list. `--diagnostic-width` was stabilized in rust-lang#95635, but the docs weren't updated.
Copy file name to clipboardexpand all lines: src/doc/rustc/src/command-line-arguments.md
+11
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,11 @@ This flag will set which lints should be set to the [warn level](lints/levels.md
270
270
271
271
_Note:_ The order of these lint level arguments is taken into account, see [lint level via compiler flag](lints/levels.md#via-compiler-flag) for more information.
272
272
273
+
<aid="option-force-warn"></a>
274
+
## `--force-warn`: force a lint to warn
275
+
276
+
This flag sets the given lint to the [forced warn level](lints/levels.md#force-warn) and the level cannot be overridden, even ignoring the [lint caps](lints/levels.md#capping-lints).
277
+
273
278
<aid="option-a-allow"></a>
274
279
## `-A`: set lint allowed
275
280
@@ -381,6 +386,12 @@ are:
381
386
-`always` — Always use colors.
382
387
-`never` — Never colorize output.
383
388
389
+
<aid="option-diagnostic-width"></a>
390
+
## `--diagnostic-width`: specify the terminal width for diagnostics
391
+
392
+
This flag takes a number that specifies the width of the terminal in characters.
393
+
Formatting of diagnostics will take the width into consideration to make them better fit on the screen.
394
+
384
395
<aid="option-remap-path-prefix"></a>
385
396
## `--remap-path-prefix`: remap source names in output
0 commit comments