mozilla/rust — Issue #1944: monomorphization fails with generic methods on impls
Author: nikomatsakis
Created: 2012-03-08 04:46:47+00:00
State: open

This test case:

```
impl foo for uint {
fn with(a: A) -> (uint, A) {
(self, a)
}
}

fn main() {
let pair = 3u.with("hi");
assert pair == (3u, "hi");
}
```

yields an assertion failure:

```
rust: upcall fail 'Assertion did.crate != ast::local_crate failed', ../src/rustc/middle/ty.rs:2294
```

@pcwalton I believe this is why the --monomorphize'd version of rustc did not work.