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

Convert some module doc comments #5999

Merged

Conversation

waywardmonkeys
Copy link
Contributor

Description
Some module doc comments were using /*! ... */ syntax and had leading * prefixes on each line. This interferes with the tracking of clippy::doc_lazy_continuation, so switch those over to //! style comment blocks.

This leaves /*! ... */ blocks alone which didn't prefix each line.

Testing
Explain how this change is tested.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Some module doc comments were using `/*! ... */` syntax and had
leading ` *` prefixes on each line. This interferes with the
tracking of `clippy::doc_lazy_continuation`, so switch those over
to `//!` style comment blocks.

This leaves `/*! ... */` blocks alone which didn't prefix each
line.
@waywardmonkeys waywardmonkeys requested a review from a team as a code owner July 20, 2024 03:10
@cwfitzgerald
Copy link
Member

Going to specifically cc @jimblandy on this one - I don't see why we shouldn't accept this though.

@waywardmonkeys
Copy link
Contributor Author

A couple of these blocks will have warnings in Rust 1.80 which is what led me down this path.

@ErichDonGubler
Copy link
Member

ErichDonGubler commented Jul 24, 2024

Going to specifically merge (🙃), and deal with any fallout that @jimblandy would like to impose. I think it's valuable to adhere to the convention that Rust upstream imposes by default, be internally consistent in the format of documentation that we have for ourselves, and avoid warnings from rustdoc.

@ErichDonGubler ErichDonGubler merged commit 4f02057 into gfx-rs:trunk Jul 24, 2024
25 checks passed
@waywardmonkeys waywardmonkeys deleted the harmonize-module-doc-comments branch July 24, 2024 15:19
@waywardmonkeys
Copy link
Contributor Author

@ErichDonGubler Thanks. There are still a number of files that use a similar syntax, but they don't indent and put a * at the start of each line.

git grep "\/\*\!"

I targeted these as some of them introduced lint failures in 1.80 with clippy::doc_lazy_continuation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants