Skip to content

use_self does not diagnose tuple structs #3498

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
gnzlbg opened this issue Dec 6, 2018 · 0 comments
Closed

use_self does not diagnose tuple structs #3498

gnzlbg opened this issue Dec 6, 2018 · 0 comments
Labels
C-bug Category: Clippy is not doing the correct thing L-suggestion Lint: Improving, adding or fixing lint suggestions

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Dec 6, 2018

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.

@phansch phansch added C-bug Category: Clippy is not doing the correct thing L-suggestion Lint: Improving, adding or fixing lint suggestions labels Dec 6, 2018
bors added a commit that referenced this issue Dec 30, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: Clippy is not doing the correct thing L-suggestion Lint: Improving, adding or fixing lint suggestions
Projects
None yet
Development

No branches or pull requests

2 participants