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

[Easy] cargo collect-metadata interprets anything behind a comma as a new lint #12042

Closed
blyxyas opened this issue Dec 29, 2023 · 1 comment · Fixed by #12088
Closed

[Easy] cargo collect-metadata interprets anything behind a comma as a new lint #12042

blyxyas opened this issue Dec 29, 2023 · 1 comment · Fixed by #12088
Assignees
Labels
A-documentation Area: Adding or improving documentation A-ui Area: Clippy interface, usage and configuration C-bug Category: Clippy is not doing the correct thing

Comments

@blyxyas
Copy link
Member

blyxyas commented Dec 29, 2023

Summary

While reviewing #10283, we stumbled across this bug that added or as a new lint to the "Affected Lints" list.

This happened because there was an "[...], or [...]" in the configuration option documentation.

Reproducer

I tried this code:

    /// Lint: PUB_UNDERSCORE_FIELDS
    ///
    /// Lint "public" fields in a struct that are prefixed with an underscore based on their
    /// exported visibility, or whether they are marked as "pub".
    (pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PublicallyExported),

I expected to see this happen (in the config's documentation):

Affected lints:

Instead, this happened:

Affected lints:


This was fixed by changing that comma to a semi-colon

Version

[...]

Additional Labels

No response

@blyxyas blyxyas added C-bug Category: Clippy is not doing the correct thing A-documentation Area: Adding or improving documentation A-ui Area: Clippy interface, usage and configuration labels Dec 29, 2023
@granddaifuku
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation A-ui Area: Clippy interface, usage and configuration C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants