Skip to content

False positive of just_underscores_and_digits when missing R_ANGLE when ending type prameters #12302

Open
@liquidhelium

Description

Summary

As it's said in the title, something like Type<T will trigger this bug.

Lint Name

clippy::just_underscores_and_digits

Reproducer

pub struct Aa<T>(PhantomData<T>);

fn aa(a: Aa<String) {

}

I saw this happen:

warning: consider choosing a more descriptive name
   --> rizlium_editor/src/extensions/editing/world_view/cam_response.rs:130:13
    |
130 | fn aa(a: Aa<String) {
    |             ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
    = note: `#[warn(clippy::just_underscores_and_digits)]` on by default

also, regular "Syntax error" did worked.

Version

rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: x86_64-unknown-linux-gnu
release: 1.75.0
LLVM version: 17.0.6

Additional Labels

No response

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions