Skip to content
New issue

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

clippy: empty_line_after_doc_comments #4393

Conversation

brooksprumo
Copy link

Problem

New clippy lints when upgrading to rust 1.84.0.

warning: empty line after doc comment
   --> streamer/src/nonblocking/quic.rs:232:1
    |
232 | / /// reduced when it is dropped.
233 | |
    | |_^
234 |   struct ClientConnectionTracker {
    |   ------------------------------ the comment documents this struct
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
    = help: if the empty line is unintentional remove it

Summary of Changes

Resolve the lints by using the suggestions from clippy and checking the code.

Partially fixes #4380

@brooksprumo brooksprumo force-pushed the rust-1.84.0/clippy/empty_line_after_doc_comments branch from 555364b to 81db0b1 Compare January 10, 2025 16:12
Comment on lines -1 to -3
/// These are syscall codes specified in SIMD-0178.
/// If a new syscall is to be included, add a new number constant
/// for correct registration.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy suggested to change this to use //! syntax to document the module itself, but it seemed these comments felt more appropriate for the define_code! list below. Let me know if //! would be preferred here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those comments refer to the entire file, so I put them right at the beginning.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Fixed in 9e19e1c.

@brooksprumo brooksprumo marked this pull request as ready for review January 10, 2025 16:14
@brooksprumo brooksprumo requested review from LucasSte and yihau January 10, 2025 16:15
@brooksprumo brooksprumo added the automerge automerge Merge this Pull Request automatically once CI passes label Jan 10, 2025
Copy link

mergify bot commented Jan 10, 2025

automerge label removed due to a CI failure

@mergify mergify bot removed the automerge automerge Merge this Pull Request automatically once CI passes label Jan 10, 2025
@brooksprumo brooksprumo removed the request for review from yihau January 10, 2025 17:59
@brooksprumo brooksprumo merged commit b94b9f6 into anza-xyz:master Jan 10, 2025
50 checks passed
@brooksprumo brooksprumo deleted the rust-1.84.0/clippy/empty_line_after_doc_comments branch January 10, 2025 18:53
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.

New clippy lints in Rust 1.84.0
2 participants