Uh oh!
There was an error while loading. Please reload this page.
Do not exclusively suggest ; when , is also a choice - #98796
Conversation
rust-highfive
commented
Jul 2, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
; when , is also a choice; when , is also a choicemichaelwoerister
commented
Jul 4, 2022
I'm not quite sure this is an improvement in all cases. E.g. in the regression test: fnmain(){let v = [12];//~^ ERROR expected one of `,`, `.`, `;`, `?`, `]`, or an operator, found `2`}Does suggesting I think this is something for the diagnostics team to decide. |
michaelwoerister
commented
Jul 4, 2022
Also: Thanks for the PR, @compiler-errors! 😀 |
It doesn't make sense type-wise, but this is parsing, so it's as valid as suggesting We could limit this to just mention |
5071d10 to
9d5c74eComparecompiler-errors
commented
Aug 2, 2022
@estebank do you have some time to look at this PR, or should I re-roll? |
compiler-errors
commented
Aug 3, 2022
r? diagnostics |
estebank
commented
Aug 4, 2022
I have to say, I'm not sure this is a net positive, but it's also not a net negative given the output changes are not really worse? @bors r+ |
bors
commented
Aug 4, 2022
compiler-errors
commented
Aug 4, 2022
@estebank: My thought process is that when I could change this if you'd like to say something like |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#98796 (Do not exclusively suggest `;` when `,` is also a choice) - rust-lang#99772 (Re-enable submodule archive downloads.) - rust-lang#100058 (Suggest a positional formatting argument instead of a captured argument) - rust-lang#100093 (Enable unused_parens for match arms) - rust-lang#100095 (More EarlyBinder cleanups) - rust-lang#100138 (Remove more Clean trait implementations) - rust-lang#100148 (RustWrapper: update for TypedPointerType in LLVM) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
estebank
commented
Aug 5, 2022
@compiler-errors honestly, it's fine. What we'd ideally do is try to parse the rest of the expression and start parsing the following node to see which token would have helped, but to do that we need a lot of machinery that we don't currently have. |
Fixes#96791