We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/// # Examples /// /// ``` /// use std::path::PathBuf; /// use std::vec; /// /// fn main() { /// } /// /// ``` fn main() { println!("Hello, world!"); }
It looks like the lint assumes the fn main() will always be in the first line of the code block..?
fn main()
warning: needless `fn main` in doctest --> src/main.rs:4:4 | 4 | /// use std::path::PathBuf; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::needless_doctest_main)]` on by default
This causes strange looking warnings.
clippy 0.0.212 (fc5d0cc 2020-02-24)
The text was updated successfully, but these errors were encountered:
I think I know the solution for this...let me code it up, just a sec.
Sorry, something went wrong.
(fix was wrongly marked closed by github)
Successfully merging a pull request may close this issue.
It looks like the lint assumes the
fn main()
will always be in the first line of the code block..?This causes strange looking warnings.
clippy 0.0.212 (fc5d0cc 2020-02-24)
The text was updated successfully, but these errors were encountered: