Skip to content

use_self does not diagnose tuple structs #3498

@gnzlbg

Description

@gnzlbg

Playground:

pub struct A(i32);

impl A {
    pub fn a() -> Self {
        A(0)  // should print warning: use Self(0)
    }
}

does not raise any warnings when the use_self lint is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingL-suggestionLint: Improving, adding or fixing lint suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions