graydon/rust — Issue #1265: Variables used in `when` still considered unused
Author: nikomatsakis
Created: 2011-12-07 03:02:17+00:00
State: open

The following code gets an error about an unused variable `b`:

```
use std;

fn foo(a: int, b: int) {
alt a {
_ when a == b { log_err "hi"; }
_ { log_err "ho"; }
}
}

fn main() {
foo(1,1);
foo(1,2);
}
```