Skip to content

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Nov 29, 2019

This checks if a) the fn main() {} function is empty or if the doctest contains a static. In both cases don't lint. While this fixes #4858 at the cost of some false negatives, but this seems a better solution than disabling the lint outright. In the long run, using syn should solve the issue in the right way.

changelog: none

This checks if a) the `fn main() {}` function is empty or if the doctest contains a `static`. In both cases don't lint.
@flip1995
Copy link
Member

flip1995 commented Dec 1, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Dec 1, 2019

📌 Commit ef7587d has been approved by flip1995

@bors
Copy link
Contributor

bors commented Dec 1, 2019

⌛ Testing commit ef7587d with merge e47ae20...

bors added a commit that referenced this pull request Dec 1, 2019
Less needless_doctest_main false positives

This checks if a) the `fn main() {}` function is empty or if the doctest contains a `static`. In both cases don't lint. While this fixes #4858 at the cost of some false negatives, but this seems a better solution than disabling the lint outright. In the long run, using `syn` should solve the issue in the right way.

changelog: none
@bors
Copy link
Contributor

bors commented Dec 1, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing e47ae20 to master...

@bors bors merged commit ef7587d into master Dec 1, 2019
@flip1995 flip1995 deleted the needful-doctest-main branch December 3, 2019 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable needless_main_doctest by default
3 participants