Parse doctests in needless_doctest_main#5912
Conversation
|
r? @Manishearth (rust_highfive has picked a reviewer for you, use r? to override) |
Manishearth
left a comment
There was a problem hiding this comment.
Code looks fine to me, is there a perf impact? cc @flip1995 to sanity check the approach here
|
Perf aspect is, that Clippy now parses items in doc code. But I don't think that this has much of an impact, since there shouldn't be that many -> I think perf wise, this should be fine. 👍 |
|
@bors r=Manishearth,flip1995 |
|
📌 Commit 1a140dc has been approved by |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This switches from text-based search to running the parser to avoid false positives. Inspired by how rustdoc handles this and by #4729.
cc @llogiq
changelog: Fix multiple false positives in [
needless_doctest_main].Fixes #5879
Fixes #4906
Fixes #5103
Fixes #4698