Apply suggestions from code review

Co-authored-by: Who? Me?! <mark-i-m@users.noreply.github.com>
Co-authored-by: Chris Simpkins <git.simpkins@gmail.com>
This commit is contained in:
Eric Huss 2020-05-27 09:26:28 -07:00 committed by Who? Me?!
parent 39edbe59ed
commit 1e8a467bc2
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ The descriptions are written in markdown, and all of them are linked in the
<!-- TODO: When should an error use an error code, and when shouldn't it? --> <!-- TODO: When should an error use an error code, and when shouldn't it? -->
[`librustc_error_codes`]: https://github.com/rust-lang/rust/blob/master/src/librustc_error_codes/error_codes.rs [`librustc_error_codes`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_error_codes/error_codes/index.html
[error index]: https://doc.rust-lang.org/error-index.html [error index]: https://doc.rust-lang.org/error-index.html
[RFC 1567]: https://github.com/rust-lang/rfcs/blob/master/text/1567-long-error-codes-explanation-normalization.md [RFC 1567]: https://github.com/rust-lang/rfcs/blob/master/text/1567-long-error-codes-explanation-normalization.md
@ -104,7 +104,7 @@ use an error-level lint instead of a fixed error.
flag. That said, don't make it so terse that it's hard to understand. flag. That said, don't make it so terse that it's hard to understand.
- The word "illegal" is illegal. Prefer "invalid" or a more specific word - The word "illegal" is illegal. Prefer "invalid" or a more specific word
instead. instead.
- Errors should document the span of code where they occur the `span_..` - Errors should document the span of code where they occur the `librustc_errors::diagnostic_builder::DiagnosticBuilder` `span_*`
methods allow to easily do this. Also `note` other spans that have methods allow to easily do this. Also `note` other spans that have
contributed to the error if the span isn't too large. contributed to the error if the span isn't too large.
- When emitting a message with span, try to reduce the span to the smallest - When emitting a message with span, try to reduce the span to the smallest