Skip to content

Commit dd83ae2

Browse files
authored
Rollup merge of rust-lang#93661 - ehuss:add-missing-rustc-arg-docs, r=estebank,Mark-Simulacrum
Add missing rustc arg docs Add documentation for recently added rustc args `-C symbol-mangling-version` was stabilized in rust-lang#90128. `--json=future-incompat` was stabilized in rust-lang#91535.
2 parents 87fd70c + 800e0e2 commit dd83ae2

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

src/doc/rustc/src/codegen-options/index.md

+15
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,21 @@ Supported values for this option are:
550550
- `symbols` - same as `debuginfo`, but the rest of the symbol table section is
551551
stripped as well if the linker supports it.
552552

553+
## symbol-mangling-version
554+
555+
This option controls the [name mangling] format for encoding Rust item names
556+
for the purpose of generating object code and linking.
557+
558+
Supported values for this option are:
559+
560+
* `v0` — The "v0" mangling scheme. The specific format is not specified at
561+
this time.
562+
563+
The default if not specified will use a compiler-chosen default which may
564+
change in the future.
565+
566+
[name mangling]: https://en.wikipedia.org/wiki/Name_mangling
567+
553568
## target-cpu
554569

555570
This instructs `rustc` to generate code specifically for a particular processor.

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

+3
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ to customize the output:
408408
argument](#option-emit), and as soon as the artifact is available on the
409409
filesystem a notification will be emitted.
410410

411+
- `future-incompat` - includes a JSON message that contains a report if the
412+
crate contains any code that may fail to compile in the future.
413+
411414
Note that it is invalid to combine the `--json` argument with the
412415
[`--color`](#option-color) argument, and it is required to combine `--json`
413416
with `--error-format=json`.

src/doc/rustc/src/json.md

+26
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,32 @@ flag][option-emit] documentation.
229229
}
230230
```
231231

232+
## Future-incompatible reports
233+
234+
If the [`--json=future-incompat`][option-json] flag is used, then a separate
235+
JSON structure will be emitted if the crate may stop compiling in the future.
236+
This contains diagnostic information about the particular warnings that may be
237+
turned into a hard error in the future. This will include the diagnostic
238+
information, even if the diagnostics have been suppressed (such as with an
239+
`#[allow]` attribute or the `--cap-lints` option).
240+
241+
```javascript
242+
{
243+
/* An array of objects describing a warning that will become a hard error
244+
in the future.
245+
*/
246+
"future_incompat_report":
247+
[
248+
{
249+
/* A diagnostic structure as defined in
250+
https://doc.rust-lang.org/rustc/json.html#diagnostics
251+
*/
252+
"diagnostic": {...},
253+
}
254+
]
255+
}
256+
```
257+
232258
[option-emit]: command-line-arguments.md#option-emit
233259
[option-error-format]: command-line-arguments.md#option-error-format
234260
[option-json]: command-line-arguments.md#option-json

0 commit comments

Comments
 (0)