summary refs log tree commit diff
path: root/src/test/ui/parser/issues
AgeCommit message (Collapse)AuthorLines
2022-05-05Allow unused rules in the testsuite where the lint triggersest31-0/+1
2022-05-02Fix invalid keyword order for function declarationsKen Matsui-9/+9
2022-04-06Stop flagging certain inner attrs as outer onesLeón Orell Valerian Liehr-0/+31
2022-03-27Provide suggestion for missing `>` in a type parameter listEsteban Kuber-9/+67
When encountering an inproperly terminated type parameter list, provide a suggestion to close it after the last non-constraint type parameter that was successfully parsed. Fix #94058.
2022-03-22diagnostics: do not suggest `fn foo({ <body> }`Michael Howell-3/+1
Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else. Fixes #83104
2022-03-18suggest removing type ascription in bad positionMichael Goulet-0/+80
2022-03-17Rollup merge of #91133 - terrarier2111:unsafe-diagnostic, r=jackh726Dylan DPC-1/+6
Improve `unsafe` diagnostic This fixes: https://github.com/rust-lang/rust/issues/90880 I didn't use the exact proposed messages though.
2022-03-11Format core and std macro rules, removing needless surrounding blocksDavid Tolnay-1/+1
2022-03-05Do not point at whole file missing `fn main`Esteban Kuber-2/+2
Only point at the end of the crate. We could try making it point at the beginning of the crate, but that is confused with `DUMMY_SP`, causing the output to be *worse*. This change will make it so that VSCode will *not* underline the whole file when `main` is missing, so other errors will be visible.
2022-02-28Tweak diagnosticsEsteban Kuber-4/+3
* Recover from invalid `'label: ` before block. * Make suggestion to enclose statements in a block multipart. * Point at `match`, `while`, `loop` and `unsafe` keywords when failing to parse their expression. * Do not suggest `{ ; }`. * Do not suggest `|` when very unlikely to be what was wanted (in `let` statements).
2022-02-12Rollup merge of #93595 - compiler-errors:ice-on-lifetime-arg, r=jackh726Matthias Krüger-1/+24
fix ICE when parsing lifetime as function argument I don't really like this, but we basically need to emit an error instead of just delaying an bug, because there are too many places in the AST that aren't covered by my previous PRs... cc: https://github.com/rust-lang/rust/issues/93282#issuecomment-1028052945
2022-02-02Add more *-unwind ABI variantsAmanieu d'Antras-1/+1
The following *-unwind ABIs are now supported: - "C-unwind" - "cdecl-unwind" - "stdcall-unwind" - "fastcall-unwind" - "vectorcall-unwind" - "thiscall-unwind" - "aapcs-unwind" - "win64-unwind" - "sysv64-unwind" - "system-unwind"
2022-02-02fix ICE when parsing lifetime as function argumentMichael Goulet-1/+24
2022-01-27Improve suggestion for escaping reserved keywordsNoah Lev-8/+8
2022-01-25delay the bug once again, generalize turbofish suggestionMichael Goulet-8/+1
2022-01-25Remove delayed bug when encountering label in bad turbofishMichael Goulet-0/+24
2022-01-14Parse `Ty?` as `Option<Ty>` and provide structured suggestionEsteban Kuber-34/+24
Swift has specific syntax that desugars to `Option<T>` similar to our `?` operator, which means that people might try to use it in Rust. Parse it and gracefully recover.
2021-12-18Rollup merge of #89090 - cjgillot:bare-dyn, r=jackh726Matthias Krüger-38/+3
Lint bare traits in AstConv. Removing the lint from lowering allows to: - make lowering querification easier; - have the lint implementation in only one place. r? `@estebank`
2021-12-13Update test to new error messageAlexis Bourget-11/+13
2021-12-10bless testsEllen-5/+5
2021-12-09Rollup merge of #91634 - terrarier2111:fix-recover-from-variant-ice, r=nagisaMatthias Krüger-0/+37
Do not attempt to suggest help for overly malformed struct/function call This fixes: https://github.com/rust-lang/rust/issues/91461
2021-12-08Do not attempt to suggest help for overly malformed struct/function callthreadexception-0/+37
2021-12-04Lint bare traits in AstConv.Camille GILLOT-38/+3
2021-12-04Do not add `;` to expected tokens list when it's wrongMichael Howell-17/+19
There's a few spots where semicolons are checked for to do error recovery, and should not be suggested (or checked for other stuff). Fixes #87647
2021-11-27Improve `unsafe` diagnosticthreadexception-1/+6
2021-11-25When recovering from a `:` in a pattern, use adequate AST patternEsteban Küber-28/+63
2021-11-20Move parser tests to parser/issues subdirectoryBadel2-0/+5955
Because the parser directory has already reached the 1000 file limit.