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

#[must_use] does not warn for unused must_use tuple components #26291

Closed
nagisa opened this issue Jun 14, 2015 · 2 comments
Closed

#[must_use] does not warn for unused must_use tuple components #26291

nagisa opened this issue Jun 14, 2015 · 2 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@nagisa
Copy link
Member

nagisa commented Jun 14, 2015

#[must_use]
struct MU;

fn a() -> (u8, MU) {
    (0, MU)
}

pub fn main() {
    a(); // does not warn
    a().1; // warns
    a().0; // does not warn
}

I believe it should warn in all three cases.

@steveklabnik steveklabnik added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Jun 15, 2015
@steveklabnik
Copy link
Member

Triage: no change

@Mark-Simulacrum
Copy link
Member

Closing in favor of #39524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

3 participants