Uh oh!
There was an error while loading. Please reload this page.
Confusing suggestion on incorrect closing } - #70633
Conversation
rust-highfive
commented
Mar 31, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
Oh, I though we had other tests covering this... that's my bad. I can be on favor of a better heuristic, for users of some editors this suggestion has been helpful. @kper could you give us an idea of what the code was when you got the bogus suggestion? We could, for example, detect empty blocks that are fully valid match arms and never suggest those. I think that's the most common source of these misleading suggestions. |
kper
commented
Apr 1, 2020
@estebank oh sorry, the PR didn't link the issue. (#70583)
Well the reason why I removed it, was the compiler returns this error message
Ok, I will try that, so I'll revert the removal. Is there anything else, I should put there instead? Because after the fix, the compiler will return a message which doesn't provide a suggestion. |
estebank
commented
Apr 1, 2020
@kper An option would be to keep track of when the last properly formed Also, for this case, ideally we would have output like |
…t properly closed block.
rust-highfive
commented
Apr 2, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
kper
commented
Apr 2, 2020
Thanks @estebank for the hint. Basically, that is what I'm doing right now. I keep track of my |
But, I have still some troubles with the tidy check. This is one of my tests. However, PS: I've seen the typo |
kper
commented
Apr 4, 2020
Nevermind, I dropped a word. Those are the new error message after the PR. My changes led to changes in different tests too. I hope, that is fine. If not, please let me know. I dropped the term "but they don't match indentation" from your proposal because it might cause confusion in some cases (the last example below where the indentation is correct). |
}}estebank
commented
Apr 23, 2020
@bors r+ |
bors
commented
Apr 23, 2020
📌 Commit f96b92f has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#70633 (Confusing suggestion on incorrect closing `}`) - rust-lang#71404 (Don't fuse Chain in its second iterator) - rust-lang#71408 (Check code blocks tags) - rust-lang#71442 (Add a "by reference" adaptor for `AllocRef`) - rust-lang#71446 (Only use read_unaligned in transmute_copy if necessary) - rust-lang#71470 (Fix doc links) - rust-lang#71479 (add back Scalar::null_ptr) Failed merges: r? @ghost
Compiler returns