graydon/rust — Issue #1474: Block style autodetection should take upvars into account
Author: marijnh
Created: 2012-01-09 10:35:00+00:00
State: open

This is a slight variation on #1467:

```
fn main() {
let x = 3;
fn blah(_a: fn()) {}
blah({|| log(error, x); });
}
```

Compiling that crashes when trans tries to resolve the upvar for `x` inside the block. I guess typeck should refuse to convert something that has upvars into a bare function. (Or, if we end up dumping bare functions, this would be moot too.)