diff options
| author | bors <bors@rust-lang.org> | 2017-05-07 16:20:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-05-07 16:20:15 +0000 |
| commit | 8d19877ecea0cd22b7f5feaac5fb549f38aa3f71 (patch) | |
| tree | ca89ad4ff763381d5bf64ecca7a4f00e27d88354 | |
| parent | a478e46eb76588a86edf8c01bdc58343652b5808 (diff) | |
| parent | 7f2f780f95e19f7a72e4a6cdcb7fe90396f23aa1 (diff) | |
| download | rust-8d19877ecea0cd22b7f5feaac5fb549f38aa3f71.tar.gz rust-8d19877ecea0cd22b7f5feaac5fb549f38aa3f71.zip | |
Auto merge of #41791 - Mark-Simulacrum:doc-guidelines, r=frewsxcv
Minor cleanup of UX guidelines. I think this fixes https://github.com/rust-lang/rust/issues/34808. It covers the [long error code explanations normalization] by linking to the RFC, and cleaning up the list where long diagnostics are defined. While the [error message overhaul] isn't covered directly, I'm not really sure that more than the [existing section] on the error/warning/help messages is warranted; the overhaul linked didn't really specify any new guidelines, primarily just changing the output format. [Long error code explanations normalization]: https://github.com/rust-lang/rfcs/blob/master/text/1567-long-error-codes-explanation-normalization.md [Error message overhaul]: https://github.com/rust-lang/rust/issues/33240 [existing section]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc-ux-guidelines.md#error-warning-help-note-messages
| -rw-r--r-- | src/doc/rustc-ux-guidelines.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/doc/rustc-ux-guidelines.md b/src/doc/rustc-ux-guidelines.md index 15b3bfebfac..0b2069e25aa 100644 --- a/src/doc/rustc-ux-guidelines.md +++ b/src/doc/rustc-ux-guidelines.md @@ -56,18 +56,22 @@ Error explanations are long form descriptions of error messages provided with the compiler. They are accessible via the `--explain` flag. Each explanation comes with an example of how to trigger it and advice on how to fix it. +Please read [RFC 1567](https://github.com/rust-lang/rfcs/blob/master/text/1567-long-error-codes-explanation-normalization.md) +for details on how to format and write long error codes. + * All of them are accessible [online](http://doc.rust-lang.org/error-index.html), which are auto-generated from rustc source code in different places: [librustc](https://github.com/rust-lang/rust/blob/master/src/librustc/diagnostics.rs), + [libsyntax](https://github.com/rust-lang/rust/blob/master/src/libsyntax/diagnostics.rs), [librustc_borrowck](https://github.com/rust-lang/rust/blob/master/src/librustc_borrowck/diagnostics.rs), [librustc_const_eval](https://github.com/rust-lang/rust/blob/master/src/librustc_const_eval/diagnostics.rs), - [librustc_lint](https://github.com/rust-lang/rust/blob/master/src/librustc_lint/types.rs), [librustc_metadata](https://github.com/rust-lang/rust/blob/master/src/librustc_metadata/diagnostics.rs), [librustc_mir](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/diagnostics.rs), [librustc_passes](https://github.com/rust-lang/rust/blob/master/src/librustc_passes/diagnostics.rs), [librustc_privacy](https://github.com/rust-lang/rust/blob/master/src/librustc_privacy/diagnostics.rs), [librustc_resolve](https://github.com/rust-lang/rust/blob/master/src/librustc_resolve/diagnostics.rs), [librustc_trans](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/diagnostics.rs), + [librustc_plugin](https://github.com/rust-lang/rust/blob/master/src/librustc_plugin/diagnostics.rs), [librustc_typeck](https://github.com/rust-lang/rust/blob/master/src/librustc_typeck/diagnostics.rs). * Explanations have full markdown support. Use it, especially to highlight code with backticks. @@ -79,7 +83,7 @@ code with backticks. * Flags should be orthogonal to each other. For example, if we'd have a json-emitting variant of multiple actions `foo` and `bar`, an additional --json flag is better than adding `--foo-json` and `--bar-json`. -* Always give options a long descriptive name, if only for better +* Always give options a long descriptive name, if only for more understandable compiler scripts. * The `--verbose` flag is for adding verbose information to `rustc` output when not compiling a program. For example, using it with the `--version` flag |
