Skip to content

warn about unused variables from patterns #941

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

Closed
jruderman opened this issue Sep 17, 2011 · 4 comments
Closed

warn about unused variables from patterns #941

jruderman opened this issue Sep 17, 2011 · 4 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jruderman
Copy link
Contributor

use std;
tag t { alpha; beta; }
fn f(x : t) { alt x { alfa { } }; }
fn main() { }

Should warn that "alfa" is an unused variable. (I misspelled the tag name and forgot a period; the warning could help me notice that I didn't succeed in having it treated as a tag name.)

@Yoric
Copy link
Contributor

Yoric commented Oct 20, 2011

I will try and work on that.

@Yoric
Copy link
Contributor

Yoric commented Oct 24, 2011

Finding my way around the typing code is harder than expected. I will try and return to the charge in a few days.

@catamorphism
Copy link
Contributor

Still doesn't warn (7/26/2012).

@nikomatsakis
Copy link
Contributor

Fixed as of e47d2f6.

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. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants