Skip to content

Commit a7f769b

Browse files
authored
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.
2 parents 8b1e647 + f5f69bc commit a7f769b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/doc/rustc/src/command-line-arguments.md

+11
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ This flag will set which lints should be set to the [warn level](lints/levels.md
270270

271271
_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.
272272

273+
<a id="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+
273278
<a id="option-a-allow"></a>
274279
## `-A`: set lint allowed
275280

@@ -381,6 +386,12 @@ are:
381386
- `always` — Always use colors.
382387
- `never` — Never colorize output.
383388

389+
<a id="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+
384395
<a id="option-remap-path-prefix"></a>
385396
## `--remap-path-prefix`: remap source names in output
386397

0 commit comments

Comments
 (0)