Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @fee1-dead (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
You'll want to write a test like https://github.com/rust-lang/rust/blob/56d6b4e427c271e8f069500f6fac4e209e946144/tests/ui/error-emitter/highlighting.rs so that this is actually tested. Searching for Looking at the screenshot, the highlighting includes the backticks, which ideally we'd not include in the highlight, but there are also words (like "an ident" or "a type"), so I guess its ok to have the logic be what it is now. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot reroll |
|
@bors r+ |
Add hightlight to acceptable characters in macro rules Add logic to highlight accepted characters in macro rules
…uwer Rollup of 4 pull requests Successful merges: - #163731 (Add bootstrap step to build the TPDE plugin) - #164060 (Add hightlight to acceptable characters in macro rules) - #164424 (diagnostic: skip wrong loops when explaining borrow errors) - #162444 (Make `std::fs::{File, ReadDir, DirEntry}` always `needs_drop` even when unsupported.)
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #164445 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#164445), which was unapproved. |
fixes #156458
cc @estebank
LLM disclosure: LL was used to generate a malformed testing macro case to exercise the logic modified. LLM was also used to review the code, and pointed out it might be better to also highlight the symbol in the single symbol match case, so I modified that logic as well. However, I was not able to craft a testing macro that trigger the logic at line 1649, so I just tested the logic by temporarily moving the logic to the match all block(line 1657) to make sure the generated output looks correct.
Before:

After:

Add logic to highlight accepted characters in macro rules