graydon/rust — Issue #1463: "upcall fail 'option none'" with recursive iface impl?
Author: jruderman
Created: 2012-01-08 08:14:37+00:00
State: open

Replacing "e" with "self" in src/test/run-pass/iface-to-str.rs causes an internal compiler error. Here's a slightly reduced testcase:

fn ignore_block(_b: block(str)->str) { }

iface to_str{
fn to_str() -> str;
}
impl to_str of to_str for [T] {
fn to_str() -> str {
ignore_block({|_e| self.to_str()});
""
}
}
fn main() {
}

The error message isn't very helpful:

upcall fail 'option none', ../src/libcore/option.rs:34