about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
AgeCommit message (Collapse)AuthorLines
2022-11-11Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, ↵Manish Goregaokar-2/+4
r=estebank Fix unused lint and parser caring about spaces to won't produce invalid code Fixes #103435
2022-11-08use subdiagnostic for sugesting add letyukang-1/+1
2022-11-08fix #103587, Recover from common if let syntax mistakes/typosyukang-0/+9
2022-11-04fake a base to suppress later extra error messageyukang-1/+1
2022-11-04fix #102806, suggest use .. to fill in the rest of the fields of Structyukang-0/+9
2022-11-01Rollup merge of #103575 - Xiretza:suggestions-style-attr, r=davidtwcoManish Goregaokar-24/+47
Change #[suggestion_*] attributes to use style="..." As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20tool_only_span_suggestion), this changes `#[(multipart_)suggestion_{short,verbose,hidden}(...)]` attributes to plain `#[(multipart_)suggestion(...)]` attributes with a `style = "{short,verbose,hidden}"` parameter. It also adds a new style, `tool-only`, that corresponds to `tool_only_span_suggestion`/`tool_only_multipart_suggestion` and causes the suggestion to not be shown in human-readable output at all. Best reviewed commit-by-commit, there's a bit of noise in there. cc #100717 `@compiler-errors` r? `@davidtwco`
2022-11-01Auto merge of #103217 - mejrs:track, r=eholkbors-0/+2
Track where diagnostics were created. This implements the `-Ztrack-diagnostics` flag, which uses `#[track_caller]` to track where diagnostics are created. It is meant as a debugging tool much like `-Ztreat-err-as-bug`. For example, the following code... ```rust struct A; struct B; fn main(){ let _: A = B; } ``` ...now emits the following error message: ``` error[E0308]: mismatched types --> src\main.rs:5:16 | 5 | let _: A = B; | - ^ expected struct `A`, found struct `B` | | | expected due to this -Ztrack-diagnostics: created at compiler\rustc_infer\src\infer\error_reporting\mod.rs:2275:31 ```
2022-10-31Add more track_callermejrs-0/+2
2022-10-26Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]Xiretza-24/+47
Using the following command: find compiler/ -type f -name '*.rs' -exec perl -i -gpe \ 's/(#\[\w*suggestion)_(short|verbose|hidden)\(\s*(\S+,)?/\1(\3style = "\2",/g' \ '{}' +
2022-10-24fix parentheses surrounding spacing issue in parseryukang-2/+4
2022-10-23Migrate all diagnosticsNilstrieb-184/+170
2022-09-27Implement IntoDiagnosticArg for rustc_ast::token::Token(Kind)Xiretza-24/+29
2022-09-27Don't unnecessarily stringify paths in diagnosticsXiretza-3/+4
2022-09-27Migrate even more diagnostics in rustc_parse to diagnostic structsXiretza-0/+211
2022-09-27Migrate "struct literal body without path" error to diagnostic structXiretza-0/+18
2022-09-27Migrate "expected semicolon" diagnostics to diagnostic structsXiretza-0/+51
2022-09-27Migrate "expected identifier" diagnostics to diagnostic structsXiretza-1/+94
2022-09-27Migrate more rustc_parse diagnostics to diagnostic structsXiretza-5/+94
2022-09-27Move rustc_parse diagnostic structs to separate moduleXiretza-0/+783