mozilla/rust — Issue #1763: Cannot determine a type for this expression
Author: brson
Created: 2012-02-06 05:46:47+00:00
State: open
Labels: bug, typeck

```
type actor = {
unused: bool
};

fn act2() -> actor {
fail;
}

fn main() {
let a: actor = act2();
}
```

```
../src/test/run-pass/issue-1471.rs:10:24: 10:28 error: cannot determine a type for this expression
../src/test/run-pass/issue-1471.rs:10 let a: actor = act2();
```

If `act2` returns `T` instead of `actor` then `T` can be inferred correctly.