@@ -56,18 +56,22 @@ Error explanations are long form descriptions of error messages provided with
56
56
the compiler. They are accessible via the ` --explain ` flag. Each explanation
57
57
comes with an example of how to trigger it and advice on how to fix it.
58
58
59
+ Please read [ RFC 1567] ( https://github.com/rust-lang/rfcs/blob/master/text/1567-long-error-codes-explanation-normalization.md )
60
+ for details on how to format and write long error codes.
61
+
59
62
* All of them are accessible [ online] ( http://doc.rust-lang.org/error-index.html ) ,
60
63
which are auto-generated from rustc source code in different places:
61
64
[ librustc] ( https://github.com/rust-lang/rust/blob/master/src/librustc/diagnostics.rs ) ,
65
+ [ libsyntax] ( https://github.com/rust-lang/rust/blob/master/src/libsyntax/diagnostics.rs ) ,
62
66
[ librustc_borrowck] ( https://github.com/rust-lang/rust/blob/master/src/librustc_borrowck/diagnostics.rs ) ,
63
67
[ librustc_const_eval] ( https://github.com/rust-lang/rust/blob/master/src/librustc_const_eval/diagnostics.rs ) ,
64
- [ librustc_lint] ( https://github.com/rust-lang/rust/blob/master/src/librustc_lint/types.rs ) ,
65
68
[ librustc_metadata] ( https://github.com/rust-lang/rust/blob/master/src/librustc_metadata/diagnostics.rs ) ,
66
69
[ librustc_mir] ( https://github.com/rust-lang/rust/blob/master/src/librustc_mir/diagnostics.rs ) ,
67
70
[ librustc_passes] ( https://github.com/rust-lang/rust/blob/master/src/librustc_passes/diagnostics.rs ) ,
68
71
[ librustc_privacy] ( https://github.com/rust-lang/rust/blob/master/src/librustc_privacy/diagnostics.rs ) ,
69
72
[ librustc_resolve] ( https://github.com/rust-lang/rust/blob/master/src/librustc_resolve/diagnostics.rs ) ,
70
73
[ librustc_trans] ( https://github.com/rust-lang/rust/blob/master/src/librustc_trans/diagnostics.rs ) ,
74
+ [ librustc_plugin] ( https://github.com/rust-lang/rust/blob/master/src/librustc_plugin/diagnostics.rs ) ,
71
75
[ librustc_typeck] ( https://github.com/rust-lang/rust/blob/master/src/librustc_typeck/diagnostics.rs ) .
72
76
* Explanations have full markdown support. Use it, especially to highlight
73
77
code with backticks.
@@ -79,7 +83,7 @@ code with backticks.
79
83
* Flags should be orthogonal to each other. For example, if we'd have a
80
84
json-emitting variant of multiple actions ` foo ` and ` bar ` , an additional
81
85
--json flag is better than adding ` --foo-json ` and ` --bar-json ` .
82
- * Always give options a long descriptive name, if only for better
86
+ * Always give options a long descriptive name, if only for more
83
87
understandable compiler scripts.
84
88
* The ` --verbose ` flag is for adding verbose information to ` rustc ` output
85
89
when not compiling a program. For example, using it with the ` --version ` flag
0 commit comments