Here's the issue report - https://github.com/mozilla/rust/issues/3702

Amitava

On Mon, Oct 8, 2012 at 8:15 PM, Tim Chevalier <[email protected]>wrote:

> On Mon, Oct 8, 2012 at 5:14 PM, Amitava Shee <[email protected]>
> wrote:
> > 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?
> >
>
> Yes, this is a compiler bug. Would you mind filling out an issue report at:
>
> https://github.com/mozilla/rust/issues/new
>
> ? (Don't worry about any of the labels or fields; we'll take care of that.)
>
> Thanks,
>
> Tim
>
> --
> Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt
> 'Wouldn't you rather be anything other than the kid who runs around
> telling stuff what he thinks it is?" -- DavEnd
>



-- 
Amitava Shee
Software Architect

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
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to