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

too_long_first_doc_comment adds outer-comment lines to inner-comments #13447

Closed
clarfonthey opened this issue Sep 24, 2024 · 1 comment
Closed
Labels
C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied

Comments

@clarfonthey
Copy link
Contributor

Summary

The auto-fix for this lint will add /// as the new line to //! comments, meaning it will break and cause a syntax error.

Reproducer

#![warn(clippy::too_long_first_doc_comment)]
//! This is a one-line summary.
//! This makes the one-line summary no longer one line.

autofixes to:

#![warn(clippy::too_long_first_doc_comment)]
//! This is a one-line summary.
///
//! This makes the one-line summary no longer one line.

Version

rustc 1.83.0-nightly (7042c269c 2024-09-23)
binary: rustc
commit-hash: 7042c269c166191cd5d8daf0409890903df7af57
commit-date: 2024-09-23
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

Additional Labels

@rustbot label +I-suggestion-causes-error

@clarfonthey clarfonthey added the C-bug Category: Clippy is not doing the correct thing label Sep 24, 2024
@rustbot rustbot added the I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied label Sep 24, 2024
@y21
Copy link
Member

y21 commented Sep 24, 2024

This looks like a duplicate of #13309 and was already fixed in #13377. It should be fixed in nightly when the next sync happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied
Projects
None yet
Development

No branches or pull requests

3 participants