I get an assertion failure while trying to compile the following use io::println;
fn main() { trait Text { fn to_str(&self) -> ~str; } fn to_string(t: Text) { println(t.to_str()); } } amitava:l2 amitava$ rustc -g trait.rs Assertion failed: (Ty && "Invalid GetElementPtrInst indices for type!"), function checkGEPType, file /Users/amitava/opt/rust/src/rust/src/llvm/include/llvm/Instructions.h, line 705. Abort trap: 6 Clearly, this code is nonsensical since there is no implementation of the trait "Text". Should the compiler produce a different message? Thanks & Regards, Amitava Shee There are two ways of constructing a software design. One is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. -- C. A. R. Hoare The Emperor's Old Clothes, CACM February 1981
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev