about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/diagnostic.rs
AgeCommit message (Collapse)AuthorLines
2021-09-17Make diagnostics clearer for `?` operatorsYuki Okushi-0/+12
2021-09-13Auto merge of #87915 - estebank:fancy-spans, r=oli-obkbors-0/+15
Use smaller spans for some structured suggestions Use more accurate suggestion spans for * argument parse error * fully qualified path * missing code block type * numeric casts
2021-09-04Fix #88256, remove duplicated diagnosticyukang-1/+48
2021-08-12Use smaller spans for some structured suggestionsEsteban Kuber-0/+15
Use more accurate suggestion spans for * argument parse error * fully qualified path * missing code block type * numeric casts * E0212
2021-07-30Use multispan suggestions more oftenEsteban Küber-0/+24
* Use more accurate span for `async move` suggestion * Use more accurate span for deref suggestion * Use `multipart_suggestion` more often
2021-06-30Force warnings even when can_emit_warnings == falseRyan Levick-1/+8
2021-05-10More minor fixes suggested by @jackh726Fabian Wolff-13/+5
2021-05-07Fix suggestions for missing return type lifetime parametersFabian Wolff-0/+24
2021-03-27Remove (lots of) dead codeJoshua Nelson-50/+8
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-27Remove unused `DiagnosticBuilder::sub` functionJoshua Nelson-0/+2
`Diagnostic::sub` is only ever used directly; it doesn't need to be included in the builder.
2021-02-13Fix ICE caused by suggestion with no code substitutionsEsteban Küber-0/+6
Change suggestion logic to filter and checking _before_ creating specific resolution suggestion. Assert earlier that suggestions contain code substitions to make it easier in the future to debug invalid uses. If we find this becomes too noisy in the wild, we can always make the emitter resilient to these cases and remove the assertions. Fix #78651.
2021-02-07Add `--extern-loc` to augment unused crate dependency diagnosticsJeremy Fitzhardinge-0/+24
This allows a build system to indicate a location in its own dependency specification files (eg Cargo's `Cargo.toml`) which can be reported along side any unused crate dependency. This supports several types of location: - 'json' - provide some json-structured data, which is included in the json diagnostics in a `tool_metadata` field - 'raw' - emit the provided string into the output. This also appears as a json string in `tool_metadata`. If no `--extern-location` is explicitly provided then a default json entry of the form `"tool_metadata":{"name":<cratename>,"path":<cratepath>}` is emitted.
2020-12-18Switch compiler/ to intra-doc linksJoshua Nelson-2/+0
rustc_lint and rustc_lint_defs weren't switched because they're included in the compiler book and so can't use intra-doc links.
2020-12-16Fix typo in method nameCamelid-1/+1
unsuccessfull -> unsuccessful
2020-12-16Add more documentation to `Diagnostic` and `DiagnosticBuilder`Camelid-4/+19
2020-10-30Implement rustc side of report-future-incompatAaron Hill-3/+10
2020-10-14Remove unused code from remaining compiler cratesest31-13/+0
2020-08-30mv compiler to compiler/mark-0/+586