Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing rustc arg docs #93661

Merged
merged 2 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/doc/rustc/src/codegen-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,21 @@ Supported values for this option are:
- `symbols` - same as `debuginfo`, but the rest of the symbol table section is
stripped as well if the linker supports it.

## symbol-mangling-version

This option controls the [name mangling] format for encoding Rust item names
for the purpose of generating object code and linking.

Supported values for this option are:

* `v0` — The "v0" mangling scheme. The specific format is not specified at
this time.
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved

The default if not specified will use a compiler-chosen default which may
change in the future.

[name mangling]: https://en.wikipedia.org/wiki/Name_mangling

## target-cpu

This instructs `rustc` to generate code specifically for a particular processor.
Expand Down
3 changes: 3 additions & 0 deletions src/doc/rustc/src/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ to customize the output:
argument](#option-emit), and as soon as the artifact is available on the
filesystem a notification will be emitted.

- `future-incompat` - includes a JSON message that contains a report if the
crate contains any code that may fail to compile in the future.

Note that it is invalid to combine the `--json` argument with the
[`--color`](#option-color) argument, and it is required to combine `--json`
with `--error-format=json`.
Expand Down
26 changes: 26 additions & 0 deletions src/doc/rustc/src/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,32 @@ flag][option-emit] documentation.
}
```

## Future-incompatible reports

If the [`--json=future-incompat`][option-json] flag is used, then a separate
JSON structure will be emitted if the crate may stop compiling in the future.
This contains diagnostic information about the particular warnings that may be
turned into a hard error in the future. This will include the diagnostic
information, even if the diagnostics have been suppressed (such as with an
`#[allow]` attribute or the `--cap-lints` option).

```javascript
{
/* An array of objects describing a warning that will become a hard error
in the future.
*/
"future_incompat_report":
[
{
/* A diagnostic structure as defined in
https://doc.rust-lang.org/rustc/json.html#diagnostics
*/
"diagnostic": {...},
}
]
}
```

[option-emit]: command-line-arguments.md#option-emit
[option-error-format]: command-line-arguments.md#option-error-format
[option-json]: command-line-arguments.md#option-json